(rroles): Expiry system and small bugfixes.

Completed the `duration` reaction role setting implementation.
Improved the `Duration` setting type format.
Moved reaction roles to their own module.
Various small bugfixes.
This commit is contained in:
2021-10-19 13:19:41 +03:00
parent cfa3c90841
commit 117b424f53
11 changed files with 256 additions and 41 deletions

View File

@@ -501,14 +501,14 @@ CREATE TABLE reaction_role_reactions(
);
CREATE INDEX reaction_role_reaction_messages ON reaction_role_reactions (messageid);
CREATE TABLE reaction_role_expiry(
CREATE TABLE reaction_role_expiring(
guildid BIGINT NOT NULL,
userid BIGINT NOT NULL,
roleid BIGINT NOT NULL,
expiry TIMESTAMPTZ NOT NULL,
reactionid INTEGER REFERENCES reaction_role_reactions (reactionid) ON DELETE SET NULL
);
CREATE INDEX reaction_role_expiry_members ON reaction_role_expiry (guildid, userid, roleid);
CREATE UNIQUE INDEX reaction_role_expiry_members ON reaction_role_expiring (guildid, userid, roleid);
-- }}}
-- vim: set fdm=marker: