Block/allow DM reminders

Only affects slash commands but this is sort of a non-issue post September
This commit is contained in:
claude Bot committed 2022-07-29 19:22:15 +01:00
1 parent 2781f2923e
commit 7b6e967a5d
10 files changed
+102 -111

No files matched your search

+4
View File
@@ -233,6 +233,10 @@ impl<'a> MultiReminderBuilder<'a> {
if let Some(guild_id) = self.guild_id {
if guild_id.member(&self.ctx.discord(), user).await.is_err() {
Err(ReminderError::InvalidTag)
} else if self.set_by.map_or(true, |i| i != user_data.id)
&& !user_data.allowed_dm
{
Err(ReminderError::UserBlockedDm)
} else {
Ok(user_data.dm_channel)
}