client permissions

This commit is contained in:
Erik 2022-05-09 23:58:57 +03:00
parent f05c803597
commit 69d91d3a1e
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
17 changed files with 20 additions and 4 deletions

View File

@ -29,6 +29,7 @@ class BanCommand extends ModerationCommand {
showUsage: true,
guildOnly: true,
memberPermissions: ['BAN_MEMBERS'],
clientPermissions: ['BAN_MEMBERS'],
skipOptions: ['prune']
});

View File

@ -27,6 +27,7 @@ class CaseCommand extends SlashCommand {
}],
guildOnly: true,
showUsage: true,
clientPermissions: ['MANAGE_MESSAGES'],
memberPermissions: ['MANAGE_MESSAGES']
});
}

View File

@ -10,6 +10,7 @@ class DehoistCommand extends ModerationCommand {
module: 'moderation',
options: [ ],
memberPermissions: ['MANAGE_NICKNAMES'],
clientPermissions: ['MANAGE_NICKNAMES'],
guildOnly: true
});

View File

@ -19,6 +19,7 @@ class HistoryCommand extends SlashCommand {
description: 'List past infractions',
module: 'moderation',
memberPermissions: ['MANAGE_MESSAGES'],
clientPermissions: ['EMBED_LINKS'],
guildOnly: true,
options: [{
name: ['before', 'after'],

View File

@ -11,7 +11,8 @@ class KickCommand extends ModerationCommand {
options: [],
guildOnly: true,
showUsage: true,
memberPermissions: ['KICK_MEMBERS']
memberPermissions: ['KICK_MEMBERS'],
clientPermissions: ['KICK_MEMBERS'],
});
}

View File

@ -21,6 +21,7 @@ class LockdownCommand extends ModerationCommand {
guildOnly: true,
showUsage: true,
memberPermissions: ['MANAGE_CHANNELS'],
clientPermissions: ['MANAGE_CHANNELS'],
skipOptions: ['users']
});

View File

@ -8,6 +8,7 @@ class ModtimersCommand extends SlashCommand {
description: 'List active timed infractions',
module: 'moderation',
memberPermissions: ['MANAGE_MESSAGES'],
clientPermissions: ['EMBED_LINKS'],
guildOnly: true
});
}

View File

@ -15,7 +15,8 @@ class MuteCommand extends ModerationCommand {
}],
guildOnly: true,
showUsage: true,
memberPermissions: ['MODERATE_MEMBERS']
memberPermissions: ['MODERATE_MEMBERS'],
clientPermissions: ['MODERATE_MEMBERS', 'MANAGE_ROLES']
// Mute client permissions are handled in the infraction.verify due to being able to use both timeout and role based mutes
});
}

View File

@ -14,6 +14,7 @@ class NicknameCommand extends ModerationCommand {
type: 'STRING'
}],
memberPermissions: ['MANAGE_NICKNAMES'],
clientPermissions: ['MANAGE_NICKNAMES'],
guildOnly: true
});

View File

@ -84,7 +84,8 @@ class PruneCommand extends ModerationCommand {
overrideOptions: true,
guildOnly: true,
showUsage: true,
memberPermissions: ['MANAGE_CHANNELS']
memberPermissions: ['MANAGE_CHANNELS'],
clientPermissions: ['MANAGE_MESSAGES'],
});
}

View File

@ -28,6 +28,7 @@ class AddroleCommand extends ModerationCommand {
},
],
memberPermissions: ['MANAGE_ROLES'],
clientPermissions: ['MANAGE_ROLES'],
skipOptions: ['points', 'expiration', 'force', 'prune']
});

View File

@ -10,6 +10,7 @@ class SlowmodeCommand extends ModerationCommand {
showUsage: true,
guildOnly: true,
memberPermissions: ['MANAGE_CHANNELS'],
clientPermissions: ['MANAGE_CHANNELS'],
options: [
{
name: 'channels',

View File

@ -9,6 +9,7 @@ class SoftbanCommand extends ModerationCommand {
module: 'moderation',
description: 'Remove member from server and purge messages',
memberPermissions: ['KICK_MEMBERS'],
clientPermissions: ['KICK_MEMBERS'],
options: [{
name: 'days',
type: 'INTEGER',

View File

@ -8,7 +8,7 @@ class StaffCommand extends SlashCommand {
description: 'Summon staff',
module: 'moderation',
guildOnly: true,
clientPermissions: ['MENTION_EVERYONE']
clientPermissions: ['MENTION_EVERYONE', 'EMBED_LINKS']
});
}

View File

@ -9,6 +9,7 @@ class UnbanCommand extends ModerationCommand {
module: 'moderation',
description: 'Remove member from server and purge messages',
memberPermissions: ['BAN_MEMBERS'],
clientPermissions: ['BAN_MEMBERS'],
options: [{
name: 'users',
type: 'USERS',

View File

@ -17,6 +17,7 @@ class UnlockdownCommand extends ModerationCommand {
guildOnly: true,
showUsage: true,
memberPermissions: ['MANAGE_CHANNELS'],
clientPermissions: ['MANAGE_CHANNELS'],
skipOptions: ['users']
});

View File

@ -12,6 +12,7 @@ class UnmuteCommand extends ModerationCommand {
guildOnly: true,
showUsage: true,
memberPermissions: ['MODERATE_MEMBERS'],
clientPermissions: ['MANAGE_ROLES', 'MODERATE_MEMBERS'],
skipOptions: ['points', 'expiration', 'prune', 'force']
});
}