Commit graph

8 commits

Author SHA1 Message Date
18f057793e bot: main: fix root logger not being initialised correctly
tl;dr: shouldn't have passed __name__ to logging.getLogger()

This also makes it so that discord.py is logging everything as
expected, which it didn't do before.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-14 00:10:05 +01:00
1dfa03bc17 bot: db: add missing type annotation for bulk_update
All checks were successful
/ test (push) Successful in 18s
Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-11 22:57:33 +01:00
80918f7a42 bot: main: register event handlers inside separate function
Makes the overall program flow nicer.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-11 22:33:52 +01:00
14be2289a9 bot: main: fix description not being split
Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-11 22:33:26 +01:00
663abf56bc main: set up basic bot without commands
All checks were successful
/ test (push) Successful in 19s
As the summary says, this sets up a basic bot that doesn't listen to
any commands yet; the bot just runs and does nothing.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-10 23:58:21 +01:00
1d571fc726 bot: db: add base model and a simple db manager
The base model basically just adds typing to peewee (lmao) and also
handles the date_created, date_updated fields all methods, except for
raw SQL.

This should make it a little easier to write a tiny async layer on top
of it all.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-10 23:56:08 +01:00
b2af736ae0 bot: env: map known env vars to object
This just makes accessing them easier.

What could be done in the future have some kind of utility method for
debugging that prints all of them or returns all of them as a dict or
something.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-10 23:31:41 +01:00
588f8d065e setup basic project structure
... without any other dependencies except the rudimentary things, for
the time being.

This builds using `uv build` and can be run via `uv run bot`.

The bot can also be installed via `uv pip install .` (from the project
root) and then be imported via `import bot`.

Signed-off-by: Max R. Carrara <max@aequito.sh>
2025-03-06 01:19:10 +01:00