video13959273737.mp4
video15959273737.mp4
-
Clone the repository:
git clone https://github.com/AdityaRao127/discordbot.git cd discordbot
-
Create a virtual environment:
python -m venv venv
-
Activate virtual environment:
./venv/Scripts/activate
source venv/bin/activate
-
Installing dependencies
pip install -r requirements.txt
-
Setting Up a Test Discord Bot
To contribute to the bot's development without the production bot token, you should set up a test Discord bot:
- Go to the Discord Developer Portal.
- Create a new application and name it (ex: testbot)
- Under the "Bot" tab, click "Add Bot".
- You will see a token under the bot username, click "Copy" to get your test bot token.
- Use this token in your local
.env
file:
-
Running and Testing the Bot
Reference the .env.example file at the top
# create .env file with the following : DISCORD_TOKEN = discord_token_here ( see below) DISCORD_CHANNEL = discord_channel DISCORD_WOJ_TWEETS = Contact me for RSS FEED DISCORD_SHAMS_TWEETS = Contact me for RSS Feed
To start the bot, run the main.py
file. The bot will appear online and start functioning as expected.
To stop the bot, press Ctrl + C
in the terminal or close the python terminal window.