diff --git a/commands/admin/assignrank.js b/commands/admin/assignrank.js index c0b4569..4484896 100644 --- a/commands/admin/assignrank.js +++ b/commands/admin/assignrank.js @@ -24,7 +24,7 @@ module.exports = class AssignRankCommand extends Command { }); } - run(message, { rank, member }) { + async run(message, { rank, member }) { const role = message.guild.roles.find('name', rank); member = message.mentions.members.first(); if (!role) { diff --git a/commands/admin/ban.js b/commands/admin/ban.js index ad1ae50..fa3c7c1 100644 --- a/commands/admin/ban.js +++ b/commands/admin/ban.js @@ -19,7 +19,7 @@ module.exports = class BanCommand extends Command { }); } - run(message) { + async run(message) { const member = message.mentions.members.first(); member.ban(reason.join(" ")).then(member => { message.reply(`${member.user.username} was succesfully banned.`); diff --git a/commands/admin/kick.js b/commands/admin/kick.js index e92f74d..3e32948 100644 --- a/commands/admin/kick.js +++ b/commands/admin/kick.js @@ -19,7 +19,7 @@ module.exports = class KickCommand extends Command { }); } - run(message) { + async run(message) { const member = message.mentions.members.first(); member.kick(reason.join(" ")).then(member => { message.reply(`${member.user.username} was succesfully kicked.`); diff --git a/commands/admin/prune.js b/commands/admin/prune.js index 973fb07..9f61524 100644 --- a/commands/admin/prune.js +++ b/commands/admin/prune.js @@ -19,7 +19,7 @@ module.exports = class PruneCommand extends Command { }); } - run(message, { amount }) { + async run(message, { amount }) { if (amount < 2 || amount > 100) { return message.reply('you need to input a number between 2 and 100.'); } diff --git a/commands/fun/badmeme.js b/commands/fun/badmeme.js index 3b90a0e..e69e046 100644 --- a/commands/fun/badmeme.js +++ b/commands/fun/badmeme.js @@ -10,7 +10,7 @@ module.exports = class BadmemeCommand extends Command { }); } - run(message) { + async run(message) { const number = Object.keys(responseObject).length; const picNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send(`${picNumber}: ${responseObject[picNumber]}`); diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index 9d837a3..7514ecd 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -10,7 +10,7 @@ module.exports = class DespacitoCommand extends Command { }); } - run(message) { + async run(message) { const number = Object.keys(responseObject).length; const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send(`${vidNumber}: ${responseObject[vidNumber]}`); diff --git a/commands/fun/funfact.js b/commands/fun/funfact.js index d89b3d2..26908a4 100644 --- a/commands/fun/funfact.js +++ b/commands/fun/funfact.js @@ -10,7 +10,7 @@ module.exports = class FunFactCommand extends Command { }); } - run(message) { + async run(message) { const number = Object.keys(responseObject).length; const funFactNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send(`Fun fact: ${responseObject[funFactNumber]}`); diff --git a/commands/fun/music.js b/commands/fun/music.js index e4f9ddd..928d0f1 100644 --- a/commands/fun/music.js +++ b/commands/fun/music.js @@ -17,7 +17,7 @@ module.exports = class MusicCommand extends Command { }); } - run(message, { ytblink }) { + async run(message, { ytblink }) { const { voiceChannel } = message.member; if (!voiceChannel) { diff --git a/commands/fun/yes.js b/commands/fun/yes.js index d463ddf..3c0a551 100644 --- a/commands/fun/yes.js +++ b/commands/fun/yes.js @@ -9,7 +9,7 @@ module.exports = class YesCommand extends Command { }); } - run(message) { + async run(message) { return message.say('haha very yes'); } }; \ No newline at end of file diff --git a/commands/owner/botAvatar.js b/commands/owner/botAvatar.js index f681236..93ad052 100644 --- a/commands/owner/botAvatar.js +++ b/commands/owner/botAvatar.js @@ -17,7 +17,8 @@ module.exports = class BotavatarCommand extends Command { }); } - run(message, { pic }) { + async run(message, { pic }) { this.client.user.setAvatar(pic); + message.say('The avatar have been changed succesfully'); } }; \ No newline at end of file diff --git a/commands/owner/ded.js b/commands/owner/ded.js index 0a134d6..f5afc28 100644 --- a/commands/owner/ded.js +++ b/commands/owner/ded.js @@ -12,6 +12,6 @@ module.exports = class DedCommand extends Command { } async run(message) { - await message.say("im dead now k bye thx); + await message.say('im dead now k bye thx'); process.exit(); }} \ No newline at end of file diff --git a/commands/owner/selftest.js b/commands/owner/selftest.js new file mode 100644 index 0000000..3c0a551 --- /dev/null +++ b/commands/owner/selftest.js @@ -0,0 +1,15 @@ +const { Command } = require('discord.js-commando'); +module.exports = class YesCommand extends Command { + constructor(client) { + super(client, { + name: 'yes', + group: 'fun', + memberName: 'yes', + description: 'very yes', + }); + } + + async run(message) { + return message.say('haha very yes'); + } +}; \ No newline at end of file diff --git a/commands/owner/status.js b/commands/owner/status.js index d4b7ec2..e557eb8 100644 --- a/commands/owner/status.js +++ b/commands/owner/status.js @@ -17,7 +17,8 @@ module.exports = class StatusCommand extends Command { }); } - run(message, { status }) { + async run(message, { status }) { this.client.user.setActivity(status); + message.say(`Status have been set to ${status}`); } }; \ No newline at end of file diff --git a/commands/owner/username.js b/commands/owner/username.js index fe5f470..cd7338f 100644 --- a/commands/owner/username.js +++ b/commands/owner/username.js @@ -17,8 +17,9 @@ module.exports = class UsernameCommand extends Command { }); } - run(message, { username }) { + async run(message, { username }) { this.client.user.setUsername(username); + message.say(`The username have been changed sucessfully to ${username}`); } }; \ No newline at end of file diff --git a/commands/thing/avatar.js b/commands/thing/avatar.js index be5f650..4f1ada1 100644 --- a/commands/thing/avatar.js +++ b/commands/thing/avatar.js @@ -9,7 +9,7 @@ module.exports = class AvatarCommand extends Command { }); } - run(message) { + async run(message) { if (!message.mentions.users.size) { return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`); } diff --git a/commands/thing/invite.js b/commands/thing/invite.js index 137ce17..d4c3dea 100644 --- a/commands/thing/invite.js +++ b/commands/thing/invite.js @@ -9,7 +9,7 @@ module.exports = class InviteCommand extends Command { }); } - run(message) { + async run(message) { return message.say('You can add me from here: https://discordapp.com/oauth2/authorize?client_id=487342817048264704&scope=bot&permissions=2054\nYou can join my support server over here: https://discord.gg/SsMCsVY come and say hi :)'); } }; \ No newline at end of file diff --git a/commands/thing/stats.js b/commands/thing/stats.js index e8218a0..da1a506 100644 --- a/commands/thing/stats.js +++ b/commands/thing/stats.js @@ -9,7 +9,7 @@ module.exports = class MeowCommand extends Command { }); } - run(message) { + async run(message) { return message.channel.send(`Servers: \`${this.client.guilds.size}\`\nChannels: \`${this.client.channels.size}\`\nUsers: \`${this.client.users.size}\`\nBot uptime: \`${process.uptime()}\``); } }; \ No newline at end of file diff --git a/commands/thing/updoot.js b/commands/thing/updoot.js index 53adc0e..abc0112 100644 --- a/commands/thing/updoot.js +++ b/commands/thing/updoot.js @@ -10,7 +10,7 @@ module.exports = class UpDootCommand extends Command { }); } - run(message) { + async run(message) { const upDoot = { color: 0x93C54B, title: 'Vote for my bot', diff --git a/index.js b/index.js index 8ba15e1..2bc7ca7 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const fs = require("fs"); // Prefix and ownerID and invite to support server const client = new CommandoClient({ - commandPrefix: 'haha', + commandPrefix: 'h3h3', owner: '267065637183029248', invite: 'https://discord.gg/SsMCsVY', });