Skip to content

Commit

Permalink
fix bug in thread channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayerch1 committed Jan 17, 2023
1 parent 8f30cd4 commit 5067b23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Bot/cogs/ReminderModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ async def print_reminder_dm(self, rem: Reminder, channel=None, err_msg=None):

async def print_reminder(self, rem: Reminder):

async def send_message(guild, channel, text, embed, rem_type: Connector.ReminderType):
if VerboseErrors.can_embed(channel):
async def send_message(guild, channel, text, embed, rem_type: Connector.ReminderType, reminder):
if isinstance(channel, discord.Thread) or VerboseErrors.can_embed(channel):
try:
if rem_type != Connector.ReminderType.EMBED_ONLY and \
rem_type != Connector.ReminderType.HYBRID:
view = None
elif isinstance(rem, IntervalReminder):
view = util.interaction.SnoozeIntervalView(rem, timeout=500)
elif isinstance(reminder, IntervalReminder):
view = util.interaction.SnoozeIntervalView(reminder, timeout=500)
else:
view = util.interaction.SnoozeView(rem, timeout=500)
view = util.interaction.SnoozeView(reminder, timeout=500)


tmp_msg = await channel.send(text, embed=embed,
Expand Down Expand Up @@ -226,7 +226,7 @@ async def send_message(guild, channel, text, embed, rem_type: Connector.Reminder
# no need to resolve author, target is sufficient
guild_name = guild.name if guild else 'Unresolved Guild'
if not channel:
err = f'`You are receiving this dm, as the desired channel on \'{guild_name}\' is not existing anymore.`'
err = f'`You are receiving this dm, as the desired channel on \'{guild_name}\' is not accesible (anymore).`'
elif isinstance(channel, discord.CategoryChannel):
# cannot use category channels
log.debug('tried to send reminder for category channel')
Expand Down Expand Up @@ -258,7 +258,7 @@ async def send_message(guild, channel, text, embed, rem_type: Connector.Reminder
eb = await rem.get_embed(self.client)
text = rem.get_embed_text()

success = await send_message(guild, channel, text, eb, rem_type)
success = await send_message(guild, channel, text, eb, rem_type, reminder=rem)


if not success:
Expand Down
6 changes: 3 additions & 3 deletions legal/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ If the bot is kicked from a server, all information is deleted (see exceptions b


__**Midterm User Data**__
Whenever a reminder is created, the bot stores all information in a database, required to deliver the reminder.
These information are only used to deliver the reminder as and will be completely once the reminder elapsed or has no future ocurrences (whichever is later).
Whenever a reminder is created, the bot stores all information required to deliver the reminder in a database.
These information are only used to deliver the reminder and will be deleted once the reminder elapsed or has no future occurrences (whichever is later).


__**Long Term User Data**__
Expand All @@ -30,7 +30,7 @@ If you want your feedback to be deleted, you need to manually join the Support S

__Analytics__
Some actions (Reminder Creation, `/help` call, ...) will be written into an Analytics Database.
The only data stored in this database, is *what* event ocurred and *when* in ocurred. The content of the event is never stored,
The only data stored in this database, is *what* event occurred and *when* in occurred. The content of the event is never stored,
which leads to a removal of all identifying and personal data like *User ID* or *Reminder Content*.

This data cannot be deleted as it's completely anonymized and not back-trackable.

0 comments on commit 5067b23

Please sign in to comment.