Block/allow DM reminders
Only affects slash commands but this is sort of a non-issue post September
This commit is contained in:
1 parent
2781f2923e
commit
7b6e967a5d
10 files changed
+102
-111
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user