bot icon indicating copy to clipboard operation
bot copied to clipboard

Avoid deleting reminders silently

Open wookie184 opened this issue 1 year ago • 1 comments

Currently a reminder will be ignored+deleted if the bot cannot get the channel it was meant to reply in: https://github.com/python-discord/bot/blob/324cb65b5e2fbc52cb494f02a11dc40e56f0a5cb/bot/exts/utils/reminders.py#L112-L124

This could happen if the remind command was run in a thread, or a channel that was deleted.

There are a couple of options here:

  • Don't allow the command in threads, or always send the reminder to e.g. #bot-commands
  • Send the reminder to e.g. #bot-commands if it failed to send. Is it ok to send reminders that may have been run in a private channel to a public channel though?
  • Try to DM the reminder to the user(s) - DMs may not always be open though
  • Just tell them the reminder failed to send in #bot-commands - avoids ever leaking anything and is simple, but they don't get the contents.

This is an edge case so I think whatever the solution it should be as simple as possible, just something better than not reminding the user(s) at all.

wookie184 avatar Apr 14 '24 17:04 wookie184

Send the reminder to e.g. #bot-commands if it failed to send. Is it ok to send reminders that may have been run in a private channel to a public channel though? Idea: send it in the parent channel if the user has permissions to send messages in the parent channel. If the user doesn't have permissions in the parent channel, dm the user. If we cannot dm the user, ping the user in bot commands.

We can also try to fetch the channel if it is a thread, in some cases it may want to be in a thread rather than not. This can also allow a simple workaround for the time-being for https://github.com/python-discord/bot/issues/3054

onerandomusername avatar Oct 13 '25 06:10 onerandomusername