Learn Before
Concept
Importing necessary libraries
Discord libraries
The following libraries are required to get basic functionality in your Discord bot:
import discord from discord_slash import SlashCommand
Environmental Variables (optional)
If you have your own libraries for creating environmental variables then you can skip this step, otherwise, add the following lines of code:
from dotenv import load_dotenv import os
load_dotenv will allow us to load the environmental variables we have saved in our .env file and os allows us to access those variables no matter what our operating system is.
0
1
Updated 2021-07-18
Tags
Python Programming Language
Data Science