diff --git a/bot/modules/reminders/data.py b/bot/modules/reminders/data.py index bf8f75fc..ee5b1a41 100644 --- a/bot/modules/reminders/data.py +++ b/bot/modules/reminders/data.py @@ -3,6 +3,6 @@ from data.interfaces import RowTable reminders = RowTable( 'reminders', - ('reminderid', 'userid', 'remind_at', 'content', 'message_link', 'interval', 'created_at'), + ('reminderid', 'userid', 'remind_at', 'content', 'message_link', 'interval', 'created_at', 'title', 'footer'), 'reminderid' ) diff --git a/bot/modules/reminders/reminder.py b/bot/modules/reminders/reminder.py index 163c7636..15772b6a 100644 --- a/bot/modules/reminders/reminder.py +++ b/bot/modules/reminders/reminder.py @@ -150,7 +150,7 @@ class Reminder: # Build the message embed embed = discord.Embed( - title="You asked me to remind you!", + title="You asked me to remind you!" if self.data.title is None else self.data.title, colour=discord.Colour.orange(), description=self.data.content, timestamp=datetime.datetime.utcnow() @@ -167,6 +167,9 @@ class Reminder: ) ) + if self.data.footer: + embed.set_footer(text=self.data.footer) + # Update the reminder data, and reschedule if required if self.data.interval: next_time = self.data.remind_at + datetime.timedelta(seconds=self.data.interval) diff --git a/data/migration/v8-v9/migration.sql b/data/migration/v8-v9/migration.sql index 88466e4c..5a46d5e1 100644 --- a/data/migration/v8-v9/migration.sql +++ b/data/migration/v8-v9/migration.sql @@ -1,6 +1,10 @@ ALTER TABLE user_config ADD COLUMN remaind_upvote BOOLEAN DEFAULT TRUE +ALTER TABLE reminders + ADD COLUMN title TEXT DEFAULT NULL, + ADD COLUMN footer TEXT DEFAULT NULL + -- Topgg Data {{{ CREATE TABLE IF NOT EXISTS topgg( voteid SERIAL PRIMARY KEY, diff --git a/data/schema.sql b/data/schema.sql index 5000b59f..4ee4378d 100644 --- a/data/schema.sql +++ b/data/schema.sql @@ -167,7 +167,9 @@ CREATE TABLE reminders( content TEXT NOT NULL, message_link TEXT, interval INTEGER, - created_at TIMESTAMP DEFAULT (now() at time zone 'utc') + created_at TIMESTAMP DEFAULT (now() at time zone 'utc'), + title TEXT DEFAULT NULL, + footer TEXT DEFAULT NULL ); CREATE INDEX reminder_users ON reminders (userid); -- }}}