Bypass self permission check for DMs
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user