LikahBot is an open source general purpose Discord bot utilising the Pycord library. It's a project I originally started when I had minimal knowledge about programming practices. This repository is the complete rewrite of that original project.
Do note that the bot is in a very very early stage of development currently and following the instructions below will not yet guarantee a usable bot.
- Clone the repository
- Navigate to the root of the cloned directory
- Create a new virtual environment
- e.g.
python3 -m venv botenv
- Launch the virtual environment
- e.g.
source botenv/bin/activate
- Install the required dependencies
python3 -m pip install -r requirements.txt -U
- Initialize the bot's database
sqlite3 database/database.db < database/schema.sql
- Change the DB_ADDRESS constant in constants.py to reflect whatever name you gave the database
- Change the DEBUG_GUILDS constant in constants.py to
[]
- If you're not going to make the bot public, you can also list the IDs of the guilds you're going to use the bot on
- Note that making a slash command public may take a while to register
- Create a new application and bot user through Discord Developer Portal
- Invite the bot to your Discord server
- e.g. use link:
https://discord.com/oauth2/authorize?client_id=[your client id here]&scope=bot%20applications.commands&permissions=[your permission integer here]
- Select your server from the list
- Get your bot's secret token from the developer portal and keep it safe
- Launch the bot
python3 src/bot.py [your secret token here]
- Optional ways to launch in the next steps
- Create a new environmental variable
- e.g.
export BOT_TOKEN=[your secret token here]
- Launch the bot using the environmental variable
- e.g.
python3 src/bot.py $BOT_TOKEN
- Install
gnupg
on your system - Create an extensionless file to store your token
echo [insert your token] > token
- Encrypt your token file
gpg -c token
- Come up with a strong enough password. You'll be needing it to launch the bot in the future.
- A file called token.gpg should be created in the root directory
- Delete the original token file
- To run the bot, use
./run.sh
(make sure you give it permission to execute)
- Type in the password if asked
If your bot uses an old version of the database, some features may not work correctly, or you may experience bugs that later versions of the database fixed.
To update your database to the latest version, just run: python3 database/db_updater.py path/to/your/database
This will update your database to the latest version.
Do note that the updater is currently untested in practical applications of the bot so it is recommended to make a backup of your database before running the updater to prevent any loss of data. If you encounter issues, make sure to create an issue.
- Dashboard
- Automod
- Logging
- Verification
- Moderation commands
- Punishment histories
- Reminders
- Birthday wishes
- Raffles and polls
- Experience and leveling
- Currency and economy
- and much more