moderation: dm user before taking action
This commit is contained in:
parent
3e3be2aed5
commit
9dce57f527
1 changed files with 4 additions and 4 deletions
|
@ -121,21 +121,21 @@ impl<T: ModActionInfo> ModAction<T> {
|
|||
dm_user: Option<bool>,
|
||||
handle_reply: bool,
|
||||
) -> Result<()> {
|
||||
let actual_reason = self.reason.clone().unwrap_or("".to_string());
|
||||
self.data.run_action(ctx, user, actual_reason).await?;
|
||||
|
||||
if quiet.unwrap_or_default() {
|
||||
ctx.defer_ephemeral().await?;
|
||||
} else {
|
||||
ctx.defer().await?;
|
||||
}
|
||||
|
||||
self.log_action(ctx).await?;
|
||||
let actual_reason = self.reason.clone().unwrap_or("".to_string());
|
||||
|
||||
if dm_user.unwrap_or_default() {
|
||||
self.dm_user(ctx, user).await?;
|
||||
}
|
||||
|
||||
self.data.run_action(ctx, user, actual_reason).await?;
|
||||
self.log_action(ctx).await?;
|
||||
|
||||
if handle_reply {
|
||||
self.reply(ctx, user, dm_user).await?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue