From 82b525a6c52cf705906dd090582439ff7f475f02 Mon Sep 17 00:00:00 2001 From: beCoditive <73736326+beCoditive@users.noreply.github.com> Date: Fri, 26 Feb 2021 18:33:43 +0530 Subject: [PATCH] Add files via upload --- commands/Fun Commands/chunk.js | 20 +++-- commands/Fun Commands/coinflip.js | 76 +++++++++---------- commands/Fun Commands/compliment.js | 29 +++++++ commands/Fun Commands/dare.js | 36 +++++++++ commands/Fun Commands/say.js | 1 - commands/Fun Commands/trivia.js | 49 ++++++++++++ commands/Fun Commands/truth.js | 36 +++++++++ commands/Image Commands/achievement.js | 8 +- commands/Image Commands/banner.js | 50 ++++++++++++ commands/Image Commands/delete.js | 5 +- commands/Image Commands/egg.js | 2 +- commands/Image Commands/goggles.js | 2 +- commands/Image Commands/ipad.js | 1 - commands/Image Commands/rip.js | 2 +- commands/Image Commands/tweet.js | 2 +- commands/Image Commands/youtube.js | 2 +- commands/Moderation Commands/BanCommand.js | 3 + commands/Moderation Commands/ClearCommand.js | 3 + .../Moderation Commands/FilterWordsCommand.js | 3 + commands/Moderation Commands/KickCommand.js | 3 + commands/Moderation Commands/WarnCommand.js | 4 + commands/Moderation Commands/annoucement.js | 3 + commands/Moderation Commands/poll.js | 3 + commands/Public Commands/invite.js | 34 +++++++++ commands/Public Commands/invites.js | 3 + 25 files changed, 318 insertions(+), 62 deletions(-) create mode 100644 commands/Fun Commands/compliment.js create mode 100644 commands/Fun Commands/dare.js create mode 100644 commands/Fun Commands/trivia.js create mode 100644 commands/Fun Commands/truth.js create mode 100644 commands/Image Commands/banner.js create mode 100644 commands/Public Commands/invite.js diff --git a/commands/Fun Commands/chunk.js b/commands/Fun Commands/chunk.js index f467adc..f3a9c18 100644 --- a/commands/Fun Commands/chunk.js +++ b/commands/Fun Commands/chunk.js @@ -1,9 +1,8 @@ -const Chuck = require('chucknorris-io'), - chunk = new Chuck(); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const discord_akairo_1 = require("discord-akairo"); const Discord = require('discord.js') +const meme = require('random-jokes-api'); class PrequelCommand extends discord_akairo_1.Command { constructor() { super('chucknorris', { @@ -20,15 +19,14 @@ class PrequelCommand extends discord_akairo_1.Command { }); } async exec(message , args) { - chunk.getRandomJoke().then(function (response) { - let embed = new Discord.MessageEmbed() - .setTitle('👊Chuck Norris👊') - .setColor('RANDOM') - .setDescription(response.value) - message.channel.send(embed) - }).catch(function (err) { - console.log(err) - }); + + let chunk = meme.chuckNorris() + + let embed = new Discord.MessageEmbed() + .setTitle('👊Chuck Norris👊') + .setColor('RANDOM') + .setDescription(chunk) + message.channel.send(embed) } } exports.default = PrequelCommand; diff --git a/commands/Fun Commands/coinflip.js b/commands/Fun Commands/coinflip.js index 046259d..c4cd273 100644 --- a/commands/Fun Commands/coinflip.js +++ b/commands/Fun Commands/coinflip.js @@ -1,39 +1,39 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); - -const discord_akairo_1 = require("discord-akairo"); -const { MessageEmbed } = require("discord.js"); -const Discord = require('discord.js') - -class coinFlipCommand extends discord_akairo_1.Command { - constructor() { - super('coinflip', { - aliases: ['coinflip', 'coin', 'roll', 'flip', 'headsortails'], - category: 'Fun Commands', - description: { - content: 'Coinflip, return head or tails to the use', - usage: 'coinflip', - examples: [ - 'coinflip' - ] - }, - ratelimit: 3 - }); - } - async exec(message , args) { - - let coinArray = [ - 'heads', - 'tails' - ] - - let answer = Math.floor(Math.random() * coinArray.length); - - let Embed = new MessageEmbed() - .setColor('RANDOM') - .setDescription(`I flipped a coin and it landed on **${coinArray[answer]}**`) - await message.channel.send(Embed) - } -} +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); + +const discord_akairo_1 = require("discord-akairo"); +const { MessageEmbed } = require("discord.js"); +const Discord = require('discord.js') + +class coinFlipCommand extends discord_akairo_1.Command { + constructor() { + super('coinflip', { + aliases: ['coinflip', 'coin', 'roll', 'flip', 'headsortails'], + category: 'Fun Commands', + description: { + content: 'Coinflip, return head or tails to the use', + usage: 'coinflip', + examples: [ + 'coinflip' + ] + }, + ratelimit: 3 + }); + } + async exec(message , args) { + + let coinArray = [ + 'heads', + 'tails' + ] + + let answer = Math.floor(Math.random() * coinArray.length); + + let Embed = new MessageEmbed() + .setColor('RANDOM') + .setDescription(`I flipped a coin and it landed on **${coinArray[answer]}**`) + await message.channel.send(Embed) + } +} exports.default = coinFlipCommand; \ No newline at end of file diff --git a/commands/Fun Commands/compliment.js b/commands/Fun Commands/compliment.js new file mode 100644 index 0000000..22beb89 --- /dev/null +++ b/commands/Fun Commands/compliment.js @@ -0,0 +1,29 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const discord_akairo_1 = require("discord-akairo"); +const Discord = require('discord.js') + +const meme = require('random-jokes-api') + +class RoastCommand extends discord_akairo_1.Command { + constructor() { + super('compliment', { + aliases: ['compliment'], + category: 'Fun Commands', + description: { + content: 'Get complimented by Max Bot.', + usage: 'compliment', + examples: [ + 'compliment' + ] + }, + ratelimit: 10 + }); + } + async exec(message , args) { + + let com = meme.copmliment() + message.channel.send(`<@${message.author.id}> ${com}`) + } +} +exports.default = RoastCommand; diff --git a/commands/Fun Commands/dare.js b/commands/Fun Commands/dare.js new file mode 100644 index 0000000..00f038e --- /dev/null +++ b/commands/Fun Commands/dare.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const discord_akairo_1 = require("discord-akairo"); +const Discord = require('discord.js') +const meme = require('random-jokes-api') +class MemeCommand extends discord_akairo_1.Command { + constructor() { + super('dare', { + aliases: ['dare'], + category: 'Fun Commands', + description: { + content: 'Generate dares from public API', + usage: 'dare', + examples: [ + 'dare' + ] + }, + ratelimit: 3 + }); + } + async exec(message , args) { + let dare = meme.dare() + + const memberName = message.mentions.users.first() + ? message.mentions.users.first().username + : message.author.username + + let embed = new Discord.MessageEmbed() + .setTitle(`${message.author.username} dared ${memberName}`) + .setColor('RANDOM') + .setDescription(dare) + + message.channel.send(embed) + } +} +exports.default = MemeCommand; diff --git a/commands/Fun Commands/say.js b/commands/Fun Commands/say.js index bf8e31f..5dd8db8 100644 --- a/commands/Fun Commands/say.js +++ b/commands/Fun Commands/say.js @@ -2,7 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); const discord_akairo_1 = require("discord-akairo"); const Discord = require('discord.js') -const fetch = require('node-fetch') class MemeCommand extends discord_akairo_1.Command { constructor() { super('say', { diff --git a/commands/Fun Commands/trivia.js b/commands/Fun Commands/trivia.js new file mode 100644 index 0000000..d1d3e7a --- /dev/null +++ b/commands/Fun Commands/trivia.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const discord_akairo_1 = require("discord-akairo"); +const Discord = require('discord.js') +const meme = require("random-jokes-api") +class TriviaCommand extends discord_akairo_1.Command { + constructor() { + super('trivia', { + aliases: ['trivia'], + category: 'Fun Commands', + description: { + content: 'Test Your Knowledge by A Quiz', + usage: 'trivia', + examples: [ + 'trivia' + ] + }, + ratelimit: 10 + }); + } + async exec(message , args) { + + let i = 0 + + let trivia = meme.trivia(); + + const Embed = new Discord.MessageEmbed() + .setTitle(trivia.question) + .setDescription(trivia.options.map(opt=>{ + i++; + return `${i} - ${opt}\n` + })) + .setColor('RANDOM') + .setFooter(`Category: ${trivia.category} | Difficulty : ${trivia.difficulty}`) + message.channel.send(Embed) + try{ + let msgs = await message.channel.awaitMessages(u2=>u2.author.id===message.author.id,{ time: 15000, max: 1, errors: ["time"] }) + if(parseInt(msgs.first().content)==trivia.correct_option){ + return message.channel.send('Bingo! You got it correct!') + }else{ + return message.channel.send(`Oh No! Incorrect Answer. Write Answer Was ` + '`' +`${trivia.answer}`+ '`') + } + }catch(e){ + console.log(e) + return message.channel.send("Time's Up. Try Again") + } + } +} +exports.default = TriviaCommand; diff --git a/commands/Fun Commands/truth.js b/commands/Fun Commands/truth.js new file mode 100644 index 0000000..e69e753 --- /dev/null +++ b/commands/Fun Commands/truth.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const discord_akairo_1 = require("discord-akairo"); +const Discord = require('discord.js') +const meme = require('random-jokes-api') +class MemeCommand extends discord_akairo_1.Command { + constructor() { + super('truth', { + aliases: ['truth'], + category: 'Fun Commands', + description: { + content: 'Generate truths from public API', + usage: 'truth', + examples: [ + 'truth' + ] + }, + ratelimit: 3 + }); + } + async exec(message , args) { + let truth = meme.truth() + + const memberName = message.mentions.users.first() + ? message.mentions.users.first().username + : message.author.username + + let embed = new Discord.MessageEmbed() + .setTitle(`${message.author.username} asked ${memberName}`) + .setColor('RANDOM') + .setDescription(truth) + + message.channel.send(embed) + } +} +exports.default = MemeCommand; diff --git a/commands/Image Commands/achievement.js b/commands/Image Commands/achievement.js index 904aa69..730e070 100644 --- a/commands/Image Commands/achievement.js +++ b/commands/Image Commands/achievement.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const discord_akairo_1 = require("discord-akairo"); const Discord = require('discord.js') const Canvas = require('canvas') -let jokes = require('../../logo_ran').jokes; +let jokes = require('../../Assets/logo_ran').jokes; class ripCommand extends discord_akairo_1.Command { constructor() { super('achievement', { @@ -20,7 +20,7 @@ class ripCommand extends discord_akairo_1.Command { }); } async exec(message , args) { - Canvas.registerFont("./font/MineC.otf", { family: "minecraft" }) + Canvas.registerFont("./Assets/font/MineC.otf", { family: "minecraft" }) const achievementText = message.content.slice(13) if(!achievementText) return message.channel.send('What achievement do you want lol') @@ -28,12 +28,12 @@ class ripCommand extends discord_akairo_1.Command { const canvas = Canvas.createCanvas(802 , 188); const ctx = canvas.getContext('2d') - const b = await Canvas.loadImage('./Images/ac.png') + const b = await Canvas.loadImage('./Assets/Images/ac.png') ctx.drawImage(b, 0, 0 ,canvas.width , canvas.height); let q = jokes[Math.floor(Math.random() * jokes.length)] - const l = await Canvas.loadImage(`./Images/Minecraft/${q.title}.png`) + const l = await Canvas.loadImage(`./Assets/Images/Minecraft/${q.title}.png`) ctx.drawImage(l, 45, 57 , 75 , 75); ctx.font = '40px "minecraft"' diff --git a/commands/Image Commands/banner.js b/commands/Image Commands/banner.js new file mode 100644 index 0000000..5c9702f --- /dev/null +++ b/commands/Image Commands/banner.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const discord_akairo_1 = require("discord-akairo"); +const { MessageEmbed } = require("discord.js"); +const Discord = require('discord.js') +const Canvas = require('canvas') +class ripCommand extends discord_akairo_1.Command { + constructor() { + super('banner', { + aliases: ['banner'], + category: 'Image Commands', + description: { + content: 'Generate a banner image of some user.', + usage: 'banner ', + examples: [ + 'banner @user' + ] + }, + ratelimit: 10 + }); + } + async exec(message , args) { + const memberLogo = message.mentions.users.first() + ? message.mentions.users.first().displayAvatarURL({ format: 'jpg' }) + : message.author.displayAvatarURL({ format: 'png' }) + + const canvas = Canvas.createCanvas(489 , 481); + const ctx = canvas.getContext('2d') + + const background = await Canvas.loadImage('./Assets/Images/banner.png') + ctx.drawImage(background, 0, 0 ,canvas.width , canvas.height); + + ctx.strokeStyle = '#740'; + ctx.strokeRect(0, 0, canvas.width, canvas.height); + + const avatar1 = await Canvas.loadImage(memberLogo); + ctx.rotate(-8 * Math.PI / 180); + ctx.drawImage(avatar1 , 5 , 284, 110, 110); + + const avatar2 = await Canvas.loadImage(memberLogo); + ctx.drawImage(avatar2 , 440 , 105 , 110, 110); + + const avatar3 = await Canvas.loadImage(memberLogo); + ctx.drawImage(avatar3 , 305 , 305 , 110, 110); + + const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'welcome-image.png'); + message.channel.send(attachment) + } +} +exports.default = ripCommand; diff --git a/commands/Image Commands/delete.js b/commands/Image Commands/delete.js index e288a33..ca8ce0d 100644 --- a/commands/Image Commands/delete.js +++ b/commands/Image Commands/delete.js @@ -2,7 +2,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); const discord_akairo_1 = require("discord-akairo"); const Discord = require('discord.js') -const DIG = require("discord-image-generation"); + +const Dig = require("discord-memer") class ripCommand extends discord_akairo_1.Command { constructor() { super('delete', { @@ -25,7 +26,7 @@ class ripCommand extends discord_akairo_1.Command { : message.author.displayAvatarURL({ format: 'png' , size: 2048 }) - let img = await new DIG.Delete().getImage(memberLogo) + let img = await new Dig.Delete().getImage(memberLogo) let attach = new Discord.MessageAttachment(img, "delete.png");; diff --git a/commands/Image Commands/egg.js b/commands/Image Commands/egg.js index b2b3c90..acc11b7 100644 --- a/commands/Image Commands/egg.js +++ b/commands/Image Commands/egg.js @@ -23,7 +23,7 @@ class UlgyCommand extends discord_akairo_1.Command { const canvas = Canvas.createCanvas( 300 , 300); const ctx = canvas.getContext('2d') - const background = await Canvas.loadImage('./Images/egg.png') + const background = await Canvas.loadImage('./Assets/Images/egg.png') ctx.drawImage(background, 0, 0 ,canvas.width , canvas.height); ctx.strokeStyle = '#740'; diff --git a/commands/Image Commands/goggles.js b/commands/Image Commands/goggles.js index eb0d38b..1b3869c 100644 --- a/commands/Image Commands/goggles.js +++ b/commands/Image Commands/goggles.js @@ -27,7 +27,7 @@ class ripCommand extends discord_akairo_1.Command { const canvas = Canvas.createCanvas(463 ,516); const ctx = canvas.getContext('2d') - const b = await Canvas.loadImage('./Images/goggles.png'); + const b = await Canvas.loadImage('./Assets/Images/goggles.png'); ctx.drawImage(b, 0, 0 ,canvas.width , canvas.height); const avatar1 = await Canvas.loadImage('https://p.kindpng.com/picc/s/21-217710_white-fade-corner-png-corner-black-fade-png.png') diff --git a/commands/Image Commands/ipad.js b/commands/Image Commands/ipad.js index 595bee8..9e7a391 100644 --- a/commands/Image Commands/ipad.js +++ b/commands/Image Commands/ipad.js @@ -36,7 +36,6 @@ class ripCommand extends discord_akairo_1.Command { const avatar = await Canvas.loadImage(memberLogo); ctx.rotate(-22 * Math.PI / 180); - ctx ctx.drawImage(avatar , 85 , 220, 120, 184); const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'welcome-image.png'); message.channel.send(attachment) diff --git a/commands/Image Commands/rip.js b/commands/Image Commands/rip.js index 60d3c93..84d5cef 100644 --- a/commands/Image Commands/rip.js +++ b/commands/Image Commands/rip.js @@ -28,7 +28,7 @@ class ripCommand extends discord_akairo_1.Command { const canvas = Canvas.createCanvas(642 , 806); const ctx = canvas.getContext('2d') - const background = await Canvas.loadImage('./Images/rip.png') + const background = await Canvas.loadImage('./Assets/Images/rip.png') ctx.drawImage(background, 0, 0 ,canvas.width , canvas.height); ctx.strokeStyle = '#740'; diff --git a/commands/Image Commands/tweet.js b/commands/Image Commands/tweet.js index bad59ff..3c6cb53 100644 --- a/commands/Image Commands/tweet.js +++ b/commands/Image Commands/tweet.js @@ -36,7 +36,7 @@ class TweetCommand extends discord_akairo_1.Command { const canvas = Canvas.createCanvas(1024 ,500); const ctx = canvas.getContext('2d') - const background = await Canvas.loadImage('./Images/tweet.png') + const background = await Canvas.loadImage('./Assets/Images/tweet.png') ctx.drawImage(background, 0, 0 ,canvas.width , canvas.height); ctx.strokeStyle = '#740'; diff --git a/commands/Image Commands/youtube.js b/commands/Image Commands/youtube.js index ebc246d..2e0498a 100644 --- a/commands/Image Commands/youtube.js +++ b/commands/Image Commands/youtube.js @@ -35,7 +35,7 @@ class YoutubeCommand extends discord_akairo_1.Command { const canvas = Canvas.createCanvas(720 ,300); const ctx = canvas.getContext('2d') - const background = await Canvas.loadImage('./Images/yt.png') + const background = await Canvas.loadImage('./Assets/Images/yt.png') ctx.drawImage(background, 0, 0 ,canvas.width , canvas.height); ctx.strokeStyle = '#740'; diff --git a/commands/Moderation Commands/BanCommand.js b/commands/Moderation Commands/BanCommand.js index f9086ef..594f44a 100644 --- a/commands/Moderation Commands/BanCommand.js +++ b/commands/Moderation Commands/BanCommand.js @@ -34,6 +34,9 @@ class BanCommand extends discord_akairo_1.Command { }); } async exec(message, { member, reason }) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + if (!message.member.permissions.has('BAN_MEMBERS')) return message.channel.send('You need to have the `Ban Members` permission to use this command.'); if (member.roles.highest.position >= message.member.roles.highest.position && message.author.id !== message.guild.ownerID) diff --git a/commands/Moderation Commands/ClearCommand.js b/commands/Moderation Commands/ClearCommand.js index 27a6c32..02c94dc 100644 --- a/commands/Moderation Commands/ClearCommand.js +++ b/commands/Moderation Commands/ClearCommand.js @@ -28,6 +28,9 @@ class ClearCommand extends discord_akairo_1.Command { }); } async exec(message, { messages }) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + if (!message.member.permissions.has('MANAGE_MESSAGES')) return message.channel.send('You need to have the `Manage Messages` permission to use this command.'); diff --git a/commands/Moderation Commands/FilterWordsCommand.js b/commands/Moderation Commands/FilterWordsCommand.js index 8ebbc76..5c7723e 100644 --- a/commands/Moderation Commands/FilterWordsCommand.js +++ b/commands/Moderation Commands/FilterWordsCommand.js @@ -33,6 +33,9 @@ class FilterWordsCommand extends discord_akairo_1.Command { }); } async exec(message, { action, fwArgs }) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + const fwJSON = JSON.parse(fs_1.readFileSync("./data.json", "utf8")); const response = new discord_js_1.MessageEmbed() .setColor('RANDOM') diff --git a/commands/Moderation Commands/KickCommand.js b/commands/Moderation Commands/KickCommand.js index 45734f0..e401825 100644 --- a/commands/Moderation Commands/KickCommand.js +++ b/commands/Moderation Commands/KickCommand.js @@ -36,6 +36,9 @@ class KickCommand extends discord_akairo_1.Command { }); } async exec(message, { member, reason }) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + if (!message.member.permissions.has('KICK_MEMBERS')) return message.channel.send('You need to have the `Kick Members` permission to use this command.'); if (member.roles.highest.position >= message.member.roles.highest.position && message.author.id !== message.guild.ownerID) diff --git a/commands/Moderation Commands/WarnCommand.js b/commands/Moderation Commands/WarnCommand.js index 8e7d749..82c4c40 100644 --- a/commands/Moderation Commands/WarnCommand.js +++ b/commands/Moderation Commands/WarnCommand.js @@ -37,8 +37,12 @@ class WarnCommand extends discord_akairo_1.Command { }); } async exec(message, { member, reason }) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + if (member.roles.highest.position >= message.member.roles.highest.position) return message.channel.send('You do not have permission to warn this member.'); const embed = await new discord.MessageEmbed() diff --git a/commands/Moderation Commands/annoucement.js b/commands/Moderation Commands/annoucement.js index 907cdc8..6978c4d 100644 --- a/commands/Moderation Commands/annoucement.js +++ b/commands/Moderation Commands/annoucement.js @@ -36,6 +36,9 @@ class AccounceCommand extends discord_akairo_1.Command { }); } async exec(message, {channel , reason}) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + if (!message.member.permissions.has('ADMINISTRATOR')) return message.channel.send('You need to have the `ADMINISTRATOR` permission to use this command.'); let annoucementChannel = channel diff --git a/commands/Moderation Commands/poll.js b/commands/Moderation Commands/poll.js index 4e5a2e0..16be8be 100644 --- a/commands/Moderation Commands/poll.js +++ b/commands/Moderation Commands/poll.js @@ -36,6 +36,9 @@ class pollCommand extends discord_akairo_1.Command { }); } async exec(message, {channel , reason}) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + if (!message.member.permissions.has('ADMINISTRATOR')) return message.channel.send('You need to have the `ADMINISTRATOR` permission to use this command.'); let pollChannel = channel diff --git a/commands/Public Commands/invite.js b/commands/Public Commands/invite.js new file mode 100644 index 0000000..d89b308 --- /dev/null +++ b/commands/Public Commands/invite.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const discord_akairo_1 = require("discord-akairo"); +const Discord = require("discord.js") +const config_1 = require("../../config"); +class InfoCommand extends discord_akairo_1.Command { + constructor() { + super('invite', { + aliases: ['invite'], + category: 'Public Commands', + description: { + content: 'Bot invite link.', + usage: 'invite', + examples: [ + 'invite' + ] + }, + ratelimit: 10 + }); + } + async exec(message) { + const embed = await new Discord.MessageEmbed() + .setAuthor(`Max Memer ${config_1.version}` , this.client.user.displayAvatarURL()) + .setColor('RANDOM') + .setThumbnail('https://cdn.discordapp.com/emojis/813674145560002601.png?v=1') + .setDescription("Are you going to add the bot or??") + .addField('**Bot Invite**' , `[Add the Bot](${config_1.inviteLink})`, true) + .addField('**Support Server**' , `[Get Support](${config_1.serverLink})`, true) + .setFooter('Copyright © 2021 beCoditive ') + + message.channel.send(embed) + } +} +exports.default = InfoCommand; diff --git a/commands/Public Commands/invites.js b/commands/Public Commands/invites.js index 87d5b1e..f87c4ab 100644 --- a/commands/Public Commands/invites.js +++ b/commands/Public Commands/invites.js @@ -19,6 +19,9 @@ class HighlightCommand extends discord_akairo_1.Command { }); } async exec(message , args) { + + if(!message.guild.me.hasPermission("ADMINISTRATOR")) return message.channel.send(":x: I need administartor Premissions for this Command LOL !") + let invites = await message.guild.fetchInvites(); // Get array of invites made by message author user