[Reminder] Allow footer and title modification
Module will be more more flexible
This commit is contained in:
@@ -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'
|
||||
)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user