fix channel restriction

This commit is contained in:
loicbersier 2020-03-19 23:24:31 +01:00
parent 097d878ca5
commit 3b2e306977
33 changed files with 34 additions and 32 deletions

View file

@ -17,7 +17,7 @@ class autoresponseCommand extends Command {
],
clientPermissions: ['SEND_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'enable/disable autoresponse',
usage: '[enable/disable]',

View file

@ -26,7 +26,7 @@ class BanCommand extends Command {
],
clientPermissions: ['BAN_MEMBERS', 'SEND_MESSAGES'],
userPermissions: ['BAN_MEMBERS'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Ban user | For hackban precise the userid',
usage: '[@user] [reason] OR [userID] [reason]',

View file

@ -25,7 +25,7 @@ class BannedWordsCommand extends Command {
flag: '--removeall'
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Ban word on the server. use the unbanword alias to delete a banned word, unbanword alias and --removeaall to remove every banned word',
usage: '[word to ban]',

View file

@ -6,7 +6,7 @@ class byeCommand extends Command {
super('bye', {
aliases: ['bye', 'leave'],
category: 'admin',
channelRestriction: 'guild',
channel: 'guild',
userPermissions: ['MANAGE_CHANNELS'],
clientPermissions: ['SEND_MESSAGES'],
args: [

View file

@ -18,7 +18,7 @@ class commandblockCommand extends Command {
],
clientPermissions: ['SEND_MESSAGES'],
userPermissions: ['ADMINISTRATOR'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Block a command. Execute that command again to unblock a command',
usage: '[command name]',

View file

@ -6,7 +6,7 @@ class fakejoinCommand extends Command {
super('fakejoin', {
aliases: ['fakejoin'],
category: 'admin',
channelRestriction: 'guild',
channel: 'guild',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [
{

View file

@ -6,7 +6,7 @@ class fakeleaveCommand extends Command {
super('fakeleave', {
aliases: ['fakeleave'],
category: 'admin',
channelRestriction: 'guild',
channel: 'guild',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [
{

View file

@ -25,7 +25,7 @@ class KickCommand extends Command {
],
clientPermissions: ['KICK_MEMBERS', 'SEND_MESSAGES'],
userPermissions: ['KICK_MEMBERS'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Kick user',
usage: '[@user] [reason]',

View file

@ -16,7 +16,7 @@ class PruneCommand extends Command {
],
clientPermissions: ['MANAGE_MESSAGES', 'SEND_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Bulk delete messages',
usage: '[amount]',

View file

@ -17,7 +17,7 @@ class quotationCommand extends Command {
],
clientPermissions: ['SEND_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'enable/disable quotation',
usage: '[enable/disable]',

View file

@ -6,7 +6,7 @@ class shameboardCommand extends Command {
super('shameboard', {
aliases: ['shameboard'],
category: 'admin',
channelRestriction: 'guild',
channel: 'guild',
userPermissions: ['MANAGE_CHANNELS'],
args: [
{

View file

@ -24,7 +24,7 @@ class SlowmodeCommand extends Command {
],
clientPermissions: ['MANAGE_CHANNELS'],
userPermissions: ['MANAGE_MESSAGES'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Put a channel in slowmode',
usage: '[1-120 slowmode] [Number of minutes the slowmode stay active]',

View file

@ -6,7 +6,7 @@ class StarBoardCommand extends Command {
super('starboard', {
aliases: ['starboard'],
category: 'admin',
channelRestriction: 'guild',
channel: 'guild',
userPermissions: ['MANAGE_CHANNELS'],
args: [
{

View file

@ -28,7 +28,7 @@ class TagCommand extends Command {
match: 'rest',
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Create custom autoresponse (--remove to delete a tag, --reset to delete EVERY tag on the server) [Click here to see the complete list of "tag"](https://cdn.discordapp.com/attachments/502198809355354133/561043193949585418/unknown.png) (Need "" if the trigger contains spaces)',
usage: '[trigger] [response]',

View file

@ -17,7 +17,7 @@ class UnbanCommand extends Command {
],
clientPermissions: ['BAN_MEMBERS'],
userPermissions: ['BAN_MEMBERS'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'unban users',
usage: '[user id]',

View file

@ -6,7 +6,7 @@ class welcomeCommand extends Command {
super('welcome', {
aliases: ['welcome', 'join'],
category: 'admin',
channelRestriction: 'guild',
channel: 'guild',
userPermissions: ['MANAGE_CHANNELS'],
args: [
{

View file

@ -25,7 +25,7 @@ class whitelistWordCommand extends Command {
flag: '--removeall'
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Whitelist word so it is not affected by the banned word, unwhitelistword alias and --removeaall to remove every banned whitelisted word',
usage: '[word to whitelist]',

View file

@ -22,7 +22,7 @@ class addDonatorCommand extends Command {
match: 'rest'
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Add id to the list of people who donated',
usage: '[userID] [userComment]',

View file

@ -31,7 +31,7 @@ class addResponseCommand extends Command {
}
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Create custom autoresponse',
usage: '[trigger] [response]',

View file

@ -17,7 +17,7 @@ class blacklistCommand extends Command {
}
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Blacklist user from the bot',
usage: '[userID]',

View file

@ -18,7 +18,7 @@ class removeResponseCommand extends Command {
}
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Remove created custom autoresponse',
usage: '[trigger]',

View file

@ -17,7 +17,7 @@ class serverBlacklistCommand extends Command {
}
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Blacklist guild from the bot',
usage: '[GuildID]',

View file

@ -26,7 +26,7 @@ class TwitterBlacklistCommand extends Command {
}
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Blacklist user from the twitter command',
usage: '[userID]',

View file

@ -5,7 +5,7 @@ class bsespamCommand extends Command {
super('bsespam', {
aliases: ['bsespam'] , //Required
category: 'reserved', //recommended
channelRestriction: 'guild', //needed if you want to restrict where we can launch the command
channel: 'guild', //needed if you want to restrict where we can launch the command
cooldown: 1800000,
ratelimit: 2,
args: [ //if need args

View file

@ -6,6 +6,7 @@ class colorCommand extends Command {
aliases: ['color', 'colour'],
category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'MANAGE_ROLES'],
channel: 'guild',
args: [
{
id: 'color',

View file

@ -20,7 +20,7 @@ class screenshotCommand extends Command {
flag: '--full'
}
],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Take a screenshot of a website. Need to start with http(s)://. Use --full to take a full page capture',
usage: '[link to a website] [optional: --full]',

View file

@ -8,7 +8,7 @@ class seebannedwordCommand extends Command {
aliases: ['seebannedword', 'seeban', 'seebanword'],
category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Show the list of banned word',
usage: '',

View file

@ -9,7 +9,7 @@ class seetagCommand extends Command {
aliases: ['seetag', 'taglist', 'tags'],
category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES'],
channelRestriction: 'guild',
channel: 'guild',
args: [
{
id: 'raw',

View file

@ -6,7 +6,7 @@ class ServerCommand extends Command {
aliases: ['server', 'serverinfo'],
category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
channelRestriction: 'guild',
channel: 'guild',
description: {
content: 'Show info about the server',
usage: '',

View file

@ -6,6 +6,7 @@ class serverIconCommand extends Command {
aliases: ['serverIcon'],
category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
channel: 'guild',
args: [
{
id: 'serverid',

View file

@ -5,7 +5,7 @@ class UpdootCommand extends Command {
super('updoot', {
aliases: ['updoot', 'upvote', 'vote'],
category: 'utility',
channelRestriction: 'guild',
channel: 'guild',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: {
content: 'Send a link to vote for my bot',

View file

@ -6,7 +6,7 @@ class userInfoCommand extends Command {
aliases: ['userInfo', 'user'],
category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
channelRestriction: 'guild',
channel: 'guild',
args: [
{
id: 'user',

View file

@ -25,10 +25,10 @@ class CommandBlockedListener extends Listener {
message.reply(Embed);
break;
case 'guild':
message.reply('You can\'t use this command in a guild!');
message.reply('You can\'t use this command in DM!');
break;
case 'dm':
message.reply('You can\'t use this command in DM!');
message.reply('You can\'t use this command in a guild!');
break;
case 'blacklist':
blacklistMessage = ['bro... i think you are blacklisted.... OWNED!!!', 'You can\'t use this command because you have been blacklisted!',' you are blacklisted!!!1111!! be less naughty next time!', 'blacklisted,,,,,, lol owned bro'];