Skip to content

Commit

Permalink
🐛 Ay Nosebot... U good?
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Jun 18, 2021
1 parent 790b7c5 commit c7bd974
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/commands/ugood.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const common = require('./../common.js');
const https = require('https');

module.exports = {
"help": 'Hey, Nosebot... u good?',
"usage": 'ugood',
process: async function (msg, command) {
if (global.crashes === 0) {
msg.channel.send(common.embedMessage(color.main, 'Im good.', 'No need to worry bout me!'));
return;
}
msg.channel.send(common.embedMessage(color.red, ':bug: Been Bettor :/', `Ive had \`${global.crashes}\` exceptions handled this session...`));
}
}
2 changes: 1 addition & 1 deletion src/config-Template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"clientId": "<CLIENT ID>",
"adminId": "466967710685855744",
"activity": "$help",
"version": "0.2.22",
"version": "0.2.4",
"commandPrefix": "$",
"disabledCommands": ["eval"]
}
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const fs = require('fs');
const Discord = require('discord.js');
const common = require('./common.js');

global.crashes = 0;
global.allCommands = [];
global.client = new Discord.Client();
global.client.commands = new Discord.Collection();
Expand Down Expand Up @@ -39,6 +40,7 @@ client.on("message", async (msg) => {
await client.commands.get(command[0].toLowerCase()).process(msg, command);
} catch (e) {
msg.channel.send(common.embedMessage(color.red, 'Error', 'Please report this Bug to **Sigma#8214**\n\`' + e + '\`'));
global.crashes++;
}
});

Expand Down

0 comments on commit c7bd974

Please sign in to comment.