forked from Supositware/Haha-Yes
This commit is contained in:
parent
693f2c0cbb
commit
6984d76733
3 changed files with 16 additions and 4 deletions
|
@ -3,7 +3,7 @@ module.exports = class MeowCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'meow',
|
name: 'meow',
|
||||||
group: 'general',
|
group: 'fun',
|
||||||
memberName: 'meow',
|
memberName: 'meow',
|
||||||
description: 'Replies with a meow, kitty cat.',
|
description: 'Replies with a meow, kitty cat.',
|
||||||
});
|
});
|
14
index.js
14
index.js
|
@ -1,30 +1,38 @@
|
||||||
const { CommandoClient } = require('discord.js-commando');
|
const { CommandoClient } = require('discord.js-commando');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { token } = require('./config.json');
|
const { token } = require('./config.json');
|
||||||
|
const responseObject = require("./reply.json");
|
||||||
|
|
||||||
|
// Prefix and ownerID and invite to support server
|
||||||
const client = new CommandoClient({
|
const client = new CommandoClient({
|
||||||
commandPrefix: 'hehe ',
|
commandPrefix: 'hehe ',
|
||||||
owner: '267065637183029248',
|
owner: '267065637183029248',
|
||||||
invite: 'https://discord.gg/SsMCsVY',
|
invite: 'https://discord.gg/SsMCsVY',
|
||||||
});
|
});
|
||||||
|
// Command groups
|
||||||
client.registry
|
client.registry
|
||||||
.registerDefaultTypes()
|
.registerDefaultTypes()
|
||||||
.registerGroups([
|
.registerGroups([
|
||||||
['general', 'The most used commands'],
|
['general', 'The most used commands'],
|
||||||
['admin', 'Commands to make admin life easier'],
|
['admin', 'Commands to make admin life easier'],
|
||||||
['owner', 'Commands the owner can use to manage the bot'],
|
['owner', 'Commands the owner can use to manage the bot'],
|
||||||
|
['fun', 'Fun commands'],
|
||||||
])
|
])
|
||||||
.registerDefaultGroups()
|
.registerDefaultGroups()
|
||||||
.registerDefaultCommands()
|
.registerDefaultCommands()
|
||||||
.registerCommandsIn(path.join(__dirname, 'commands'));
|
.registerCommandsIn(path.join(__dirname, 'commands'));
|
||||||
|
// Ready messages
|
||||||
client.on('ready', () => {
|
client.on('ready', () => {
|
||||||
console.log(`Logged in as ${client.user.tag}! (${client.user.id})`);
|
console.log(`Logged in as ${client.user.tag}! (${client.user.id})`);
|
||||||
console.log(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users.`);
|
console.log(`Ready to serve in ${client.channels.size} channels on ${client.guilds.size} servers, for a total of ${client.users.size} users.`);
|
||||||
client.user.setActivity('with nobody :(');
|
client.user.setActivity('with nobody :(');
|
||||||
});
|
});
|
||||||
|
// Auto respond to messages
|
||||||
|
client.on("message", (message) => {
|
||||||
|
if(responseObject[message.content]) {
|
||||||
|
message.channel.send(responseObject[message.content]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
client.on('error', console.error);
|
client.on('error', console.error);
|
||||||
|
|
||||||
|
|
4
reply.json
Normal file
4
reply.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"haha": "haha yes",
|
||||||
|
"lol": "veri fun"
|
||||||
|
}
|
Loading…
Reference in a new issue