Still remove the reaction even if pings are disabled
This commit is contained in:
parent
ccb6ba5d30
commit
67e55736f0
@ -294,12 +294,12 @@ namespace PluralKit.Bot
|
|||||||
await member.SendMessageAsync($"`<@{msg.Message.Sender}>`");
|
await member.SendMessageAsync($"`<@{msg.Message.Sender}>`");
|
||||||
}
|
}
|
||||||
catch (UnauthorizedException) { }
|
catch (UnauthorizedException) { }
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
var embed = new DiscordEmbedBuilder().WithDescription($"[Jump to pinged message]({args.Message.JumpLink})");
|
var embed = new DiscordEmbedBuilder().WithDescription($"[Jump to pinged message]({args.Message.JumpLink})");
|
||||||
await args.Channel.SendMessageAsync($"Psst, **{msg.Member.DisplayName ?? msg.Member.Name}** (<@{msg.Message.Sender}>), you have been pinged by <@{args.User.Id}>.", embed: embed.Build());
|
await args.Channel.SendMessageAsync($"Psst, **{msg.Member.DisplayName ?? msg.Member.Name}** (<@{msg.Message.Sender}>), you have been pinged by <@{args.User.Id}>.", embed: embed.Build());
|
||||||
|
}
|
||||||
|
|
||||||
// Finally remove the original reaction (if we can)
|
// Finally remove the original reaction (if we can)
|
||||||
if (args.Channel.BotHasAllPermissions(Permissions.ManageMessages))
|
if (args.Channel.BotHasAllPermissions(Permissions.ManageMessages))
|
||||||
|
Loading…
Reference in New Issue
Block a user