Bypass self permission check for DMs

This commit is contained in:
jude
2024-02-24 22:27:29 +00:00
parent 74b7b5d711
commit 90f05758d0
3 changed files with 8 additions and 3 deletions

View File

@ -59,6 +59,11 @@ async fn macro_check(ctx: Context<'_>) -> bool {
async fn check_self_permissions(ctx: Context<'_>) -> bool {
let user_id = ctx.serenity_context().cache.current_user().id;
// DM permissions are always fine
if ctx.guild_id().is_none() {
return true;
}
let (view_channel, send_messages, embed_links, manage_webhooks) = ctx
.channel_id()
.to_channel(&ctx)