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>,
|
dm_user: Option<bool>,
|
||||||
handle_reply: bool,
|
handle_reply: bool,
|
||||||
) -> Result<()> {
|
) -> 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() {
|
if quiet.unwrap_or_default() {
|
||||||
ctx.defer_ephemeral().await?;
|
ctx.defer_ephemeral().await?;
|
||||||
} else {
|
} else {
|
||||||
ctx.defer().await?;
|
ctx.defer().await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.log_action(ctx).await?;
|
let actual_reason = self.reason.clone().unwrap_or("".to_string());
|
||||||
|
|
||||||
if dm_user.unwrap_or_default() {
|
if dm_user.unwrap_or_default() {
|
||||||
self.dm_user(ctx, user).await?;
|
self.dm_user(ctx, user).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.data.run_action(ctx, user, actual_reason).await?;
|
||||||
|
self.log_action(ctx).await?;
|
||||||
|
|
||||||
if handle_reply {
|
if handle_reply {
|
||||||
self.reply(ctx, user, dm_user).await?;
|
self.reply(ctx, user, dm_user).await?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue