Merge pull request #4 from Terryiscool160/master

Fixing of my bugs and new stuff.
This commit is contained in:
Emily 2020-03-10 00:44:17 +00:00 committed by GitHub
commit c19e502a91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 2 deletions

View file

@ -17,7 +17,7 @@ exports.conf = {
exports.help = {
name: "catfact",
category: "User",
category: "Fun",
description: "Sends a fun fact about a cat.",
usage: "catfact/kittenfact"
};

27
src/commands/diceroll.js Normal file
View file

@ -0,0 +1,27 @@
exports.run = async (bot, message, args) => {
if (args.length === 0) {
message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
} else {
if (args[0].match(/^\d+$/)) {
message.channel.send(`🎲 You rolled a ${Array.from(Array(parseInt(args[0])).keys()).random() + 1}!`);
} else {
message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
}
}
};
exports.conf = {
enabled: true,
guildOnly: false,
aliases: ["diceroll"],
permLevel: "User",
requiredPerms: []
};
exports.help = {
name: "dice",
category: "Fun",
description: "Rolls a dice.",
usage: "dice"
};

View file

@ -17,7 +17,7 @@ exports.conf = {
exports.help = {
name: "dogfact",
category: "User",
category: "Fun",
description: "Sends a fun fact about a doggo.",
usage: "dogfact/pupfact"
};

3
src/events/disconnect.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = client => { // logs if the bot gets disconnected from discord.
client.logger.warn(`Bot disconnected at ${new Date()}`);
};

View file

@ -0,0 +1,3 @@
module.exports = client => { // logs when the bot reconnects to discord
client.logger.info(`Reconnecting at ${new Date()}`);
};