Check for perm

This commit is contained in:
loicbersier 2019-11-09 12:04:01 +01:00
parent 8441ad09df
commit 0113996b80
70 changed files with 102 additions and 38 deletions

View file

@ -19,6 +19,7 @@ class autoresponseCommand extends Command {
type: 'string' type: 'string'
} }
], ],
clientPermissions: ['SEND_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'], userPermissions: ['MANAGE_MESSAGES'],
channelRestriction: 'guild', channelRestriction: 'guild',
description: { description: {

View file

@ -23,12 +23,12 @@ class BanCommand extends Command {
match: 'rest' match: 'rest'
} }
], ],
clientPermissions: ['BAN_MEMBERS'], clientPermissions: ['BAN_MEMBERS', 'SEND_MESSAGES'],
userPermissions: ['BAN_MEMBERS'], userPermissions: ['BAN_MEMBERS'],
channelRestriction: 'guild', channelRestriction: 'guild',
description: { description: {
content: 'Ban user', content: 'Ban user',
usage: '[@user]', usage: '[@user] [reason]',
examples: ['@user big dumb dumb'] examples: ['@user big dumb dumb']
} }
}); });

View file

@ -7,7 +7,7 @@ class BannedWordsCommand extends Command {
aliases: ['bannedword', 'banword'], aliases: ['bannedword', 'banword'],
category: 'admin', category: 'admin',
userPermissions: ['MANAGE_MESSAGES'], userPermissions: ['MANAGE_MESSAGES'],
clientPermissions: ['MANAGE_MESSAGES'], clientPermissions: ['MANAGE_MESSAGES', 'SEND_MESSAGES'],
args: [ args: [
{ {
id: 'word', id: 'word',

View file

@ -23,12 +23,12 @@ class KickCommand extends Command {
match: 'rest' match: 'rest'
} }
], ],
clientPermissions: ['KICK_MEMBERS'], clientPermissions: ['KICK_MEMBERS', 'SEND_MESSAGES'],
userPermissions: ['KICK_MEMBERS'], userPermissions: ['KICK_MEMBERS'],
channelRestriction: 'guild', channelRestriction: 'guild',
description: { description: {
content: 'Kick user', content: 'Kick user',
usage: '[@user]', usage: '[@user] [reason]',
examples: ['@user big dumb dumb'] examples: ['@user big dumb dumb']
} }
}); });

View file

@ -14,7 +14,7 @@ class PruneCommand extends Command {
type: 'integer' type: 'integer'
} }
], ],
clientPermissions: ['MANAGE_MESSAGES'], clientPermissions: ['MANAGE_MESSAGES', 'SEND_MESSAGES'],
userPermissions: ['MANAGE_MESSAGES'], userPermissions: ['MANAGE_MESSAGES'],
channelRestriction: 'guild', channelRestriction: 'guild',
description: { description: {

View file

@ -14,9 +14,7 @@ class shameboardCommand extends Command {
type: 'string', type: 'string',
prompt: { prompt: {
start: 'What emote should be used to enter the shameboard?', start: 'What emote should be used to enter the shameboard?',
optional: true
}, },
default: '✡'
}, },
{ {
id: 'count', id: 'count',
@ -34,7 +32,7 @@ class shameboardCommand extends Command {
} }
], ],
description: { description: {
content: 'Set shameobard --remove to remove the shameboard', content: 'Set shameobard in the current channel. --remove to remove the shameboard',
usage: '[emote] [minimum number required to enter shameboard]', usage: '[emote] [minimum number required to enter shameboard]',
examples: [''] examples: ['']
} }

View file

@ -27,8 +27,8 @@ class SlowmodeCommand extends Command {
channelRestriction: 'guild', channelRestriction: 'guild',
description: { description: {
content: 'Put a channel in slowmode', content: 'Put a channel in slowmode',
usage: '[1-120 slowmode] [time it stays on]', usage: '[1-120 slowmode] [Number of minutes the slowmode stay active]',
examples: ['267065637183029248'] examples: ['5 60']
} }
}); });
} }

View file

@ -14,9 +14,7 @@ class StarBoardCommand extends Command {
type: 'string', type: 'string',
prompt: { prompt: {
start: 'What emote should be used to enter the shameboard?', start: 'What emote should be used to enter the shameboard?',
optional: true
}, },
default: '🌟'
}, },
{ {
id: 'count', id: 'count',
@ -34,7 +32,7 @@ class StarBoardCommand extends Command {
} }
], ],
description: { description: {
content: 'Set starboard --remove to remove the starboard', content: 'Set starboard to the current channel. --remove to remove the starboard',
usage: '[emote] [minimum number required to enter starboard]', usage: '[emote] [minimum number required to enter starboard]',
examples: [''] examples: ['']
} }

View file

@ -22,7 +22,6 @@ class TagCommand extends Command {
match: 'rest', match: 'rest',
prompt: { prompt: {
start: 'What word or sentence should the response be?', start: 'What word or sentence should the response be?',
optional: true
} }
}, },
{ {

View file

@ -8,6 +8,7 @@ class FourchanCommand extends Command {
constructor() { constructor() {
super('4chan', { super('4chan', {
aliases: ['4chan'], aliases: ['4chan'],
clientPermissions: ['EMBED_LINKS', 'SEND_MESSAGES'],
category: 'fun', category: 'fun',
args: [ args: [

View file

@ -13,6 +13,7 @@ class asciifyCommand extends Command {
super('asciify', { super('asciify', {
aliases: ['asciify'], aliases: ['asciify'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES'],
cooldown: 600000, cooldown: 600000,
ratelimit: 2, ratelimit: 2,
description: { description: {

View file

@ -7,6 +7,7 @@ class dosentexistCommand extends Command {
super('dosentexist', { super('dosentexist', {
aliases: ['doesntexist', 'thispersondoesnotexist', 'de'], aliases: ['doesntexist', 'thispersondoesnotexist', 'de'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
description: { description: {
content: 'Send images from thispersondoesnotexist.com', content: 'Send images from thispersondoesnotexist.com',
usage: '', usage: '',

View file

@ -6,6 +6,7 @@ class explosmCommand extends Command {
super('explosm', { super('explosm', {
aliases: ['explosm', 'rcg'], aliases: ['explosm', 'rcg'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
description: { description: {
content: 'Comic randomly generated from http://explosm.net/rcg', content: 'Comic randomly generated from http://explosm.net/rcg',
usage: '', usage: '',

View file

@ -8,6 +8,7 @@ class fakejoinCommand extends Command {
aliases: ['fakejoin'], aliases: ['fakejoin'],
category: 'admin', category: 'admin',
channelRestriction: 'guild', channelRestriction: 'guild',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'member', id: 'member',

View file

@ -8,6 +8,7 @@ class fakeleaveCommand extends Command {
aliases: ['fakeleave'], aliases: ['fakeleave'],
category: 'admin', category: 'admin',
channelRestriction: 'guild', channelRestriction: 'guild',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'member', id: 'member',

View file

@ -6,6 +6,7 @@ class InspiroBotCommand extends Command {
super('InspiroBot', { super('InspiroBot', {
aliases: ['inspirobot', 'ib'], aliases: ['inspirobot', 'ib'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
description: { description: {
content: 'Send images from Inspirobot', content: 'Send images from Inspirobot',
usage: '', usage: '',

View file

@ -6,6 +6,7 @@ class ImgurCommand extends Command {
super('imgur', { super('imgur', {
aliases: ['imgur', 'badmeme'], aliases: ['imgur', 'badmeme'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: { description: {
content: 'Send some random images from imgur', content: 'Send some random images from imgur',
usage: '', usage: '',

View file

@ -7,6 +7,7 @@ class RedditCommand extends Command {
super('reddit', { super('reddit', {
aliases: ['reddit'], aliases: ['reddit'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
args: [ args: [
{ {
id: 'sub', id: 'sub',

View file

@ -8,6 +8,7 @@ class spbCommand extends Command {
super('spb', { super('spb', {
aliases: ['spb'], aliases: ['spb'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -8,6 +8,7 @@ class dectalkCommand extends Command {
super('dectalk', { super('dectalk', {
aliases: ['dectalk', 'dec'], aliases: ['dectalk', 'dec'],
category: 'fun', category: 'fun',
clientPermissions: ['ATTACH_FILES'],
args: [ args: [
{ {
id: 'decMessage', id: 'decMessage',

View file

@ -8,6 +8,7 @@ class dectalkvcCommand extends Command {
super('dectalkvc', { super('dectalkvc', {
aliases: ['dectalkvc', 'decvc'], aliases: ['dectalkvc', 'decvc'],
category: 'fun', category: 'fun',
clientPermissions: ['ATTACH_FILES'],
args: [ args: [
{ {
id: 'decMessage', id: 'decMessage',

View file

@ -8,6 +8,7 @@ class samCommand extends Command {
super('sam', { super('sam', {
aliases: ['sam'], aliases: ['sam'],
category: 'fun', category: 'fun',
clientPermissions: ['ATTACH_FILES'],
args: [ args: [
{ {
id: 'samMessage', id: 'samMessage',

View file

@ -8,6 +8,7 @@ class samvcCommand extends Command {
super('samvc', { super('samvc', {
aliases: ['samvc'], aliases: ['samvc'],
category: 'fun', category: 'fun',
clientPermissions: ['ATTACH_FILES'],
args: [ args: [
{ {
id: 'samMessage', id: 'samMessage',

View file

@ -9,6 +9,7 @@ class TtsCommand extends Command {
super('tts', { super('tts', {
aliases: ['tts'], aliases: ['tts'],
category: 'fun', category: 'fun',
clientPermissions: ['ATTACH_FILES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -9,6 +9,7 @@ class TtsvcCommand extends Command {
super('ttsvc', { super('ttsvc', {
aliases: ['ttsvc'], aliases: ['ttsvc'],
category: 'fun', category: 'fun',
clientPermissions: ['ATTACH_FILES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -9,6 +9,7 @@ class vidshittifierCommand extends Command {
super('vidshittifier', { super('vidshittifier', {
aliases: ['vidshittifier', 'vs', 'shittifier', 'vid2shit', 'v2s'], aliases: ['vidshittifier', 'vs', 'shittifier', 'vid2shit', 'v2s'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',
@ -36,6 +37,7 @@ class vidshittifierCommand extends Command {
} }
let input = `${os.tmpdir()}/${message.id}.mp4`; let input = `${os.tmpdir()}/${message.id}.mp4`;
let input2 = `${os.tmpdir()}/tmp${message.id}.mp4`;
let output = `${os.tmpdir()}/Shittified${message.id}.mp4`; let output = `${os.tmpdir()}/Shittified${message.id}.mp4`;
let compression; let compression;
@ -44,13 +46,11 @@ class vidshittifierCommand extends Command {
if (args.compression == 1) { if (args.compression == 1) {
compression = '50k'; compression = '50k';
audioCompression = '100k'; audioCompression = '100k';
} else if (args.compression == 2) { } else {
compression = '30k'; compression = '30k';
audioCompression = '60k'; audioCompression = '60k';
} else {
compression = '10k';
audioCompression = '20k';
} }
let option = `-b:v ${compression} -b:a ${audioCompression}`; let option = `-b:v ${compression} -b:a ${audioCompression}`;
let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>'); let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');
@ -70,7 +70,11 @@ class vidshittifierCommand extends Command {
} }
function shittifie() { function shittifie() {
exec(`ffmpeg -i ${input} ${option} -vcodec libx264 -r 15 -f mp4 ${output}`) // reduce video resolution
exec(`ffmpeg -i ${input} -vf "scale=iw/4:ih/4" ${input2}`)
.then(() => {
// upscale video and change bitrate
exec(`ffmpeg -i ${input2} ${option} -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2" -vcodec libx264 -r 15 -f mp4 ${output}`)
.then(() => { .then(() => {
loadingmsg.delete(); loadingmsg.delete();
message.delete(); message.delete();
@ -86,6 +90,7 @@ class vidshittifierCommand extends Command {
loadingmsg.delete(); loadingmsg.delete();
return message.channel.send('On no! an error just occured! Im gonna be honest with you, i don\'t know what caused it yet! but worry not! my owner will look into it soon!'); return message.channel.send('On no! an error just occured! Im gonna be honest with you, i don\'t know what caused it yet! but worry not! my owner will look into it soon!');
}); });
});
} }
} }
} }

View file

@ -10,6 +10,7 @@ class ytpCommand extends Command {
super('ytp', { super('ytp', {
aliases: ['ytp', 'ytpplus', 'ytp+'], aliases: ['ytp', 'ytpplus', 'ytp+'],
category: 'fun', category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'add', id: 'add',
@ -114,7 +115,7 @@ class ytpCommand extends Command {
let options = { let options = {
debug: false, // Better set this to false to avoid flood in console debug: true, // Better set this to false to avoid flood in console
MAX_STREAM_DURATION: Math.floor((Math.random() * 3) + 1), // Random duration of video clip MAX_STREAM_DURATION: Math.floor((Math.random() * 3) + 1), // Random duration of video clip
sources: './asset/ytp/sources/', sources: './asset/ytp/sources/',
sounds: './asset/ytp/sounds/', sounds: './asset/ytp/sounds/',
@ -122,7 +123,7 @@ class ytpCommand extends Command {
resources: './asset/ytp/resources/', resources: './asset/ytp/resources/',
temp: os.tmpdir(), temp: os.tmpdir(),
sourceList: asset, sourceList: asset,
outro: './asset/ytp/outro.mp4', // Need an outro or it won't work //outro: './asset/ytp/outro.mp4', // Need an outro or it won't work
OUTPUT_FILE: `${os.tmpdir()}/${message.id}_YTP.mp4`, OUTPUT_FILE: `${os.tmpdir()}/${message.id}_YTP.mp4`,
MAX_CLIPS: MAX_CLIPS, MAX_CLIPS: MAX_CLIPS,
transitions: true, transitions: true,
@ -137,7 +138,7 @@ class ytpCommand extends Command {
effect_SpeedUp: true, effect_SpeedUp: true,
effect_SlowDown: true, effect_SlowDown: true,
effect_Dance: true, effect_Dance: true,
effect_Squidward: false // Not yet implemented effect_Squidward: true // Not yet implemented
} }
}; };
@ -145,7 +146,8 @@ class ytpCommand extends Command {
.then(() => { .then(() => {
loadingmsg.delete(); loadingmsg.delete();
return message.reply('Here is your YTP!', {files: [`${os.tmpdir()}/${message.id}_YTP.mp4`]}) return message.reply('Here is your YTP!', {files: [`${os.tmpdir()}/${message.id}_YTP.mp4`]})
.catch(() => { .catch(err => {
console.error(err);
return message.channel.send('Whoops, look like the vid might be too big for discord, my bad, please try again'); return message.channel.send('Whoops, look like the vid might be too big for discord, my bad, please try again');
}); });
}) })

View file

@ -7,6 +7,7 @@ class AdviceCommand extends Command {
super('advice', { super('advice', {
aliases: ['advice'], aliases: ['advice'],
category: 'general', category: 'general',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: { description: {
content: 'Send some random advices', content: 'Send some random advices',
usage: '', usage: '',

View file

@ -5,6 +5,7 @@ class ClapCommand extends Command {
super('clap', { super('clap', {
aliases: ['clap'], aliases: ['clap'],
category: 'general', category: 'general',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -7,6 +7,7 @@ class EmotesayCommand extends Command {
super('emotesay', { super('emotesay', {
aliases: ['emotesay', 'esay'], aliases: ['emotesay', 'esay'],
category: 'general', category: 'general',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -7,6 +7,7 @@ class SayCommand extends Command {
super('say', { super('say', {
aliases: ['say'], aliases: ['say'],
category: 'general', category: 'general',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -5,6 +5,7 @@ class spoilerCommand extends Command {
super('spoiler', { super('spoiler', {
aliases: ['spoiler'], aliases: ['spoiler'],
category: 'general', category: 'general',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -12,6 +12,7 @@ class tweetCommand extends Command {
super('tweet', { super('tweet', {
aliases: ['tweet'], aliases: ['tweet'],
category: 'general', category: 'general',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
cooldown: 3600000, cooldown: 3600000,
ratelimit: 3, ratelimit: 3,
args: [ args: [

View file

@ -7,6 +7,7 @@ class autocropCommand extends Command {
super('autocrop', { super('autocrop', {
aliases: ['autocrop', 'crop'], aliases: ['autocrop', 'crop'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -7,6 +7,7 @@ class blurCommand extends Command {
super('blur', { super('blur', {
aliases: ['blur'], aliases: ['blur'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -7,6 +7,7 @@ class FetishCommand extends Command {
super('fetish', { super('fetish', {
aliases: ['fetish'], aliases: ['fetish'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'image', id: 'image',

View file

@ -7,6 +7,7 @@ class gaussianCommand extends Command {
super('gaussian', { super('gaussian', {
aliases: ['gaussian'], aliases: ['gaussian'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -8,6 +8,7 @@ class GodCommand extends Command {
super('god', { super('god', {
aliases: ['god'], aliases: ['god'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'image', id: 'image',

View file

@ -7,6 +7,7 @@ class IdubbbzCommand extends Command {
super('idubbbz', { super('idubbbz', {
aliases: ['idubbbz', 'edups'], aliases: ['idubbbz', 'edups'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -7,6 +7,7 @@ class IdubbbzPaintCommand extends Command {
super('idubbbzpaint', { super('idubbbzpaint', {
aliases: ['idubbbzpaint', 'edupspaint'], aliases: ['idubbbzpaint', 'edupspaint'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -7,6 +7,7 @@ class jpegifyCommand extends Command {
super('jpegify', { super('jpegify', {
aliases: ['jpegify'], aliases: ['jpegify'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -7,6 +7,7 @@ class LikeCommand extends Command {
super('like', { super('like', {
aliases: ['like'], aliases: ['like'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'image', id: 'image',

View file

@ -9,6 +9,7 @@ class memeCommand extends Command {
super('meme', { super('meme', {
aliases: ['meme', 'impact'], aliases: ['meme', 'impact'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -7,6 +7,7 @@ class mirrorCommand extends Command {
super('mirror', { super('mirror', {
aliases: ['mirror', 'flip'], aliases: ['mirror', 'flip'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -11,6 +11,7 @@ class nolightCommand extends Command {
super('nolight', { super('nolight', {
aliases: ['nolight', 'nl'], aliases: ['nolight', 'nl'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'text', id: 'text',

View file

@ -7,6 +7,7 @@ class paintCommand extends Command {
super('paint', { super('paint', {
aliases: ['paint'], aliases: ['paint'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'image', id: 'image',

View file

@ -7,6 +7,7 @@ class rotateCommand extends Command {
super('rotate', { super('rotate', {
aliases: ['rotate'], aliases: ['rotate'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',

View file

@ -7,6 +7,7 @@ class UglyCommand extends Command {
super('ugly', { super('ugly', {
aliases: ['ugly'], aliases: ['ugly'],
category: 'images', category: 'images',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'image', id: 'image',

View file

@ -10,6 +10,7 @@ class borgarCommand extends Command {
super('borgar', { super('borgar', {
aliases: ['borgar', 'hamburgor', 'hamborgar', 'burger', 'hamburger', 'borger'], aliases: ['borgar', 'hamburgor', 'hamborgar', 'burger', 'hamburger', 'borger'],
category: 'minigame', category: 'minigame',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: { description: {
content: 'Make amborgar,,,,,,,,,, ( MINI GAME VERY WIP, LEVEL/XP SYSTEM MIGHT BE BULLSHIT )', content: 'Make amborgar,,,,,,,,,, ( MINI GAME VERY WIP, LEVEL/XP SYSTEM MIGHT BE BULLSHIT )',
usage: '', usage: '',

View file

@ -7,6 +7,7 @@ class guessCommand extends Command {
super('guess', { super('guess', {
aliases: ['guess'], aliases: ['guess'],
category: 'minigame', category: 'minigame',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
args: [ args: [
{ {
id: 'leaderboard', id: 'leaderboard',

View file

@ -8,6 +8,7 @@ class aboutCommand extends Command {
super('about', { super('about', {
aliases: ['about', 'credit'], aliases: ['about', 'credit'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: { description: {
content: 'About me ( the bot )', content: 'About me ( the bot )',
usage: '', usage: '',

View file

@ -5,6 +5,7 @@ class AvatarCommand extends Command {
super('avatar', { super('avatar', {
aliases: ['avatar', 'avy'], aliases: ['avatar', 'avy'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'user', id: 'user',

View file

@ -6,6 +6,7 @@ class donateCommand extends Command {
super('donate', { super('donate', {
aliases: ['donate', 'donation', 'giveallmymoney', 'givemoney'], aliases: ['donate', 'donation', 'giveallmymoney', 'givemoney'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: { description: {
content: 'Send donate link for the bot and support server', content: 'Send donate link for the bot and support server',
usage: '', usage: '',

View file

@ -6,6 +6,7 @@ class donatorCommand extends Command {
super('donator', { super('donator', {
aliases: ['donator'], aliases: ['donator'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES'],
description: { description: {
content: 'All the people who donated for this bot <3', content: 'All the people who donated for this bot <3',
usage: '', usage: '',

View file

@ -10,6 +10,7 @@ class DownloadCommand extends Command {
super('download', { super('download', {
aliases: ['download', 'dl'], aliases: ['download', 'dl'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'link', id: 'link',
@ -29,7 +30,6 @@ class DownloadCommand extends Command {
flag: ['--spoil', '--spoiler', '-s'] flag: ['--spoil', '--spoiler', '-s']
} }
], ],
clientPermissions: ['ATTACH_FILES'],
description: { description: {
content: 'Download videos from different website from the link you provided, use "-s" to make the vid a spoiler', content: 'Download videos from different website from the link you provided, use "-s" to make the vid a spoiler',
usage: '[link] [caption]', usage: '[link] [caption]',
@ -101,9 +101,9 @@ class DownloadCommand extends Command {
const Embed = new MessageEmbed() const Embed = new MessageEmbed()
.setColor(message.member.displayHexColor) .setColor(message.member.displayHexColor)
.setTitle(`Downloaded by ${message.author.username}`) .setAuthor(`Downloaded by ${message.author.username}`, message.author.displayAvatarURL(), link)
.setDescription(args.caption) .setDescription(args.caption)
.setURL(link); .setFooter('You can get the original video by clicking on the "downloaded by" message!');
return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}compressed.mp4`]}) return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}compressed.mp4`]})
.catch(err => { .catch(err => {
@ -118,9 +118,10 @@ class DownloadCommand extends Command {
const Embed = new MessageEmbed() const Embed = new MessageEmbed()
.setColor(message.member.displayHexColor) .setColor(message.member.displayHexColor)
.setTitle(`Downloaded by ${message.author.username}`) .setAuthor(`Downloaded by ${message.author.username}`, message.author.displayAvatarURL(), link)
.setDescription(args.caption) .setDescription(args.caption)
.setURL(link); .setFooter('You can get the original video by clicking on the "downloaded by" message!');
return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}.mp4`]}) return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}.mp4`]})
.catch(err => { .catch(err => {

View file

@ -7,6 +7,7 @@ class FeedbackCommand extends Command {
super('feedback', { super('feedback', {
aliases: ['feedback'], aliases: ['feedback'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'text', id: 'text',
@ -40,6 +41,7 @@ class FeedbackCommand extends Command {
.addField('Feedback', args.text) .addField('Feedback', args.text)
.setTimestamp(); .setTimestamp();
channel.send({embed: Embed}); channel.send({embed: Embed});
message.channel.send('Your feedback has been sent!'); message.channel.send('Your feedback has been sent!');
} }
} }

View file

@ -10,6 +10,7 @@ class gif2vidCommand extends Command {
super('gif2vid', { super('gif2vid', {
aliases: ['gif2vid', 'g2v', 'gv'], aliases: ['gif2vid', 'g2v', 'gv'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'vid', id: 'vid',

View file

@ -6,6 +6,7 @@ class InviteCommand extends Command {
super('invite', { super('invite', {
aliases: ['invite'], aliases: ['invite'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES'],
args: [ args: [
{ {
id: 'here', id: 'here',

View file

@ -11,6 +11,7 @@ class PingCommand extends Command {
type: 'string', type: 'string',
} }
], ],
clientPermissions: ['SEND_MESSAGES'],
description: { description: {
content: 'Ping the bot', content: 'Ping the bot',
usage: '', usage: '',

View file

@ -6,6 +6,7 @@ class playCommand extends Command {
super('play', { super('play', {
aliases: ['play'], aliases: ['play'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'SPEAK'],
args: [ args: [
{ {
id: 'ytblink', id: 'ytblink',

View file

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

View file

@ -10,6 +10,7 @@ class seetagCommand extends Command {
super('taglist', { super('taglist', {
aliases: ['seetag', 'taglist', 'tags'], aliases: ['seetag', 'taglist', 'tags'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
channelRestriction: 'guild', channelRestriction: 'guild',
args: [ args: [
{ {

View file

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

View file

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

View file

@ -9,6 +9,7 @@ class StatsCommand extends Command {
super('stats', { super('stats', {
aliases: ['stats'], aliases: ['stats'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
description: { description: {
content: 'Show some stats about the bot', content: 'Show some stats about the bot',
usage: '', usage: '',

View file

@ -6,6 +6,7 @@ class SayCommand extends Command {
super('strawpoll', { super('strawpoll', {
aliases: ['strawpoll', 'poll'], aliases: ['strawpoll', 'poll'],
category: 'general', category: 'general',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
args: [ args: [
{ {
id: 'title', id: 'title',

View file

@ -8,6 +8,7 @@ class TranslationCommand extends Command {
super('translation', { super('translation', {
aliases: ['translation', 'trn'], aliases: ['translation', 'trn'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
args: [ args: [
{ {
id: 'language', id: 'language',

View file

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

View file

@ -10,6 +10,7 @@ class vid2gifCommand extends Command {
super('vid2gif', { super('vid2gif', {
aliases: ['vid2gif', 'v2g', 'vg'], aliases: ['vid2gif', 'v2g', 'vg'],
category: 'utility', category: 'utility',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
args: [ args: [
{ {
id: 'vid', id: 'vid',

View file

@ -9,6 +9,8 @@ class missingPermissionsListener extends Listener {
} }
async exec(message, command, type, missing) { async exec(message, command, type, missing) {
if (missing == 'SEND_MESSAGES') return; // If bot can't send messages just do nothing
switch(type) { switch(type) {
case 'client': case 'client':
message.reply(`Im missing the required permissions for this command!, \`${missing}\``); message.reply(`Im missing the required permissions for this command!, \`${missing}\``);