Discord bot that lets you snooze specific messages, reminding you about them later.
Add the bot to your server with this link: TODO
All bot interactions are performed via the discord Apps context menu or via slash commands in DMs with the bot user.
If you want to host the bot yourself, use the docker container: TODO
To run the bot without the container, follow the Development instructions below.
- Developed on Windows in VSCode
- Python
- The repo's
.python-version
file indicates the version to usepyenv install versionHere
,pyenv local versionHere
- The repo's
- Pycord
- Sqlite (probably switch to postgres later)
- Tortoise ORM
- Clone the repo
- Install/select the correct python version using pyenv
- The repo's
.python-version
file indicates the version to use - Install using pyenv-win
pyenv install versionHere
,pyenv local versionHere
- The repo's
- Remember to make python venv (
python -m venv venv
) - Remember to activate python venv (
.\venv\Scripts\Activate.ps1
) - Install requirements
pip install -r .\requirements.txt
- NOTE: Until pycord fixes their stuff,
audioop-lts; python_version>='3.13'
is needed. The requirements file should take care of this for you.
- NOTE: Until pycord fixes their stuff,
- Set up the
.env
file with a bot token. - For first time db setup, use
python .\db-init.py
in the/src/
directory. TODO aerich - When running, use
python .\src\laterbot
from the project root directory. - Linter rule help https://pylint.readthedocs.io/en/latest/user_guide/messages/message_control.html
Migrations must be run after adding or changing datbase models.
Aerich is used for migrations and is installed by pip.
To create the database for the first time on a new machine, run this from the project root directory:
aerich init-db
To make a new migration, use aerich migrate --name migration_name_here
from the project root directory.
Find more info on Aerich with Tortoise here: https://tortoise.github.io/migration.html
Apparently the Aerich dev doesn't want to officially support sqlite so you may need to write a bunch of migrations manually.
To make an empty migration file to edit manually, use aerich migrate --name migration_name_here --empty
.
- Docker container
- CI/CD pipeline
- Intelligent reminder distribution loop (instead of a fixed interval, wait until the next reminder is due, unless one is scheduled sooner)
- Per-user "remind at" preset times
- Auto db cleanup of delivered reminders
- More robust error handling