Discord bot for personal server.
python3
sqlite3
discord
sqlalchemy
sqlalchemy_utils
alembic
numpy
pytz
-
Create a discord bot project on the discord website.
-
Create a new python file called
creds.py
with the following format:CREDS = { "DISCORD_TOKEN": "your_token_here", "DATABASE_CONNECTION": "sqlite:///iris.db", "SQL_LOGGING": True, "KARMA_TIMEOUT_S": 120 }
where
your_token_here
comes from the Bot section of your discord bot project (Settings > Bot). -
Create blank database by running:
sqlite3 iris.db "VACUUM;"
-
Run
alembic upgrade head
-
Manually insert first admin user into the
user
table by running$ sqlite3 iris.db sqlite> INSERT INTO user (uid,admin) VALUES (<USER_ID>,1);
where
<USER_ID>
is your discord integer id. You can find this by enabling developer mode (User Settings > Appearance), then clicking on your user in Discord and selecting "Copy ID".