feat: store timeouts in database and log them ending
we have to do this because discord doesn't notify us when a timeout ends naturally, only when a moderator removes it early.
This commit is contained in:
parent
f0fcfd7bd3
commit
e6d68338db
7 changed files with 249 additions and 1 deletions
|
|
@ -0,0 +1,9 @@
|
|||
create table timeouts (
|
||||
id integer generated by default as identity primary key,
|
||||
user_id bigint not null,
|
||||
guild_id bigint not null,
|
||||
moderator_id bigint,
|
||||
until timestamptz not null
|
||||
);
|
||||
|
||||
create unique index ix_timeouts_user_guild on timeouts (user_id, guild_id);
|
||||
Loading…
Add table
Add a link
Reference in a new issue