forked from Supositware/Haha-Yes
async
This commit is contained in:
parent
1e3a85f162
commit
77564478ad
19 changed files with 36 additions and 18 deletions
|
@ -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);
|
const role = message.guild.roles.find('name', rank);
|
||||||
member = message.mentions.members.first();
|
member = message.mentions.members.first();
|
||||||
if (!role) {
|
if (!role) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports = class BanCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
const member = message.mentions.members.first();
|
const member = message.mentions.members.first();
|
||||||
member.ban(reason.join(" ")).then(member => {
|
member.ban(reason.join(" ")).then(member => {
|
||||||
message.reply(`${member.user.username} was succesfully banned.`);
|
message.reply(`${member.user.username} was succesfully banned.`);
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports = class KickCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
const member = message.mentions.members.first();
|
const member = message.mentions.members.first();
|
||||||
member.kick(reason.join(" ")).then(member => {
|
member.kick(reason.join(" ")).then(member => {
|
||||||
message.reply(`${member.user.username} was succesfully kicked.`);
|
message.reply(`${member.user.username} was succesfully kicked.`);
|
||||||
|
|
|
@ -19,7 +19,7 @@ module.exports = class PruneCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message, { amount }) {
|
async run(message, { amount }) {
|
||||||
if (amount < 2 || amount > 100) {
|
if (amount < 2 || amount > 100) {
|
||||||
return message.reply('you need to input a number between 2 and 100.');
|
return message.reply('you need to input a number between 2 and 100.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = class BadmemeCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
const number = Object.keys(responseObject).length;
|
const number = Object.keys(responseObject).length;
|
||||||
const picNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
const picNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
||||||
message.channel.send(`${picNumber}: ${responseObject[picNumber]}`);
|
message.channel.send(`${picNumber}: ${responseObject[picNumber]}`);
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = class DespacitoCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
const number = Object.keys(responseObject).length;
|
const number = Object.keys(responseObject).length;
|
||||||
const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
||||||
message.channel.send(`${vidNumber}: ${responseObject[vidNumber]}`);
|
message.channel.send(`${vidNumber}: ${responseObject[vidNumber]}`);
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = class FunFactCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
const number = Object.keys(responseObject).length;
|
const number = Object.keys(responseObject).length;
|
||||||
const funFactNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
const funFactNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
||||||
message.channel.send(`Fun fact: ${responseObject[funFactNumber]}`);
|
message.channel.send(`Fun fact: ${responseObject[funFactNumber]}`);
|
||||||
|
|
|
@ -17,7 +17,7 @@ module.exports = class MusicCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message, { ytblink }) {
|
async run(message, { ytblink }) {
|
||||||
const { voiceChannel } = message.member;
|
const { voiceChannel } = message.member;
|
||||||
|
|
||||||
if (!voiceChannel) {
|
if (!voiceChannel) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ module.exports = class YesCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
return message.say('haha very yes');
|
return message.say('haha very yes');
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -17,7 +17,8 @@ module.exports = class BotavatarCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message, { pic }) {
|
async run(message, { pic }) {
|
||||||
this.client.user.setAvatar(pic);
|
this.client.user.setAvatar(pic);
|
||||||
|
message.say('The avatar have been changed succesfully');
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -12,6 +12,6 @@ module.exports = class DedCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
await message.say("im dead now k bye thx);
|
await message.say('im dead now k bye thx');
|
||||||
process.exit();
|
process.exit();
|
||||||
}}
|
}}
|
15
commands/owner/selftest.js
Normal file
15
commands/owner/selftest.js
Normal file
|
@ -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');
|
||||||
|
}
|
||||||
|
};
|
|
@ -17,7 +17,8 @@ module.exports = class StatusCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message, { status }) {
|
async run(message, { status }) {
|
||||||
this.client.user.setActivity(status);
|
this.client.user.setActivity(status);
|
||||||
|
message.say(`Status have been set to ${status}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -17,8 +17,9 @@ module.exports = class UsernameCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message, { username }) {
|
async run(message, { username }) {
|
||||||
this.client.user.setUsername(username);
|
this.client.user.setUsername(username);
|
||||||
|
message.say(`The username have been changed sucessfully to ${username}`);
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -9,7 +9,7 @@ module.exports = class AvatarCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
if (!message.mentions.users.size) {
|
if (!message.mentions.users.size) {
|
||||||
return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`);
|
return message.channel.send(`Your avatar: ${message.author.displayAvatarURL}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 :)');
|
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 :)');
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -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()}\``);
|
return message.channel.send(`Servers: \`${this.client.guilds.size}\`\nChannels: \`${this.client.channels.size}\`\nUsers: \`${this.client.users.size}\`\nBot uptime: \`${process.uptime()}\``);
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -10,7 +10,7 @@ module.exports = class UpDootCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
run(message) {
|
async run(message) {
|
||||||
const upDoot = {
|
const upDoot = {
|
||||||
color: 0x93C54B,
|
color: 0x93C54B,
|
||||||
title: 'Vote for my bot',
|
title: 'Vote for my bot',
|
||||||
|
|
2
index.js
2
index.js
|
@ -6,7 +6,7 @@ const fs = require("fs");
|
||||||
|
|
||||||
// Prefix and ownerID and invite to support server
|
// Prefix and ownerID and invite to support server
|
||||||
const client = new CommandoClient({
|
const client = new CommandoClient({
|
||||||
commandPrefix: 'haha',
|
commandPrefix: 'h3h3',
|
||||||
owner: '267065637183029248',
|
owner: '267065637183029248',
|
||||||
invite: 'https://discord.gg/SsMCsVY',
|
invite: 'https://discord.gg/SsMCsVY',
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue