and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

...
 
Commits (7)
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
"editor.detectIndentation": false, "editor.detectIndentation": false,
"editor.autoIndent": "advanced", "editor.autoIndent": "advanced",
"editor.tabSize": 2, "editor.tabSize": 2,
"editor.insertSpaces": true "editor.insertSpaces": false
} }
const source = require('./source');
const whoami = require('./whoami');
const ping = require('./ping');
module.exports = async (message) => { module.exports = async (message) => {
const guildId = '465448041286205443'; // const guildId = '465448041286205443';
const channelId = '735147889088528394'; // const channelId = '735147889088528394';
//---------------error checks------------------- // if (guildId != message.guild.id) return; // Exit if the server isn't the specified one
if (guildId != message.guild.id) return; // Exit if the server isn't the specified one // if (channelId != message.channel.id) return; // Exit if the channel on the server isn't the specified
if (channelId != message.channel.id) return; // Exit if the channel on the server isn't the specified
let regex = /^!pt\s.+/i; let whiteSpaceRegex = /\s/i;
if (!regex.exec(message.content)) return; // Return if message doesn't begin with !pt const args = message.content.split(whiteSpaceRegex);
//----------------------------------------------- let command = args.shift(); // Extract command from message
if (!command.startsWith('!') || command.length == 1) return; // Exit if command doesn't start with ! or if command just a '!'
try {
await message.reply('\t Chal be lodu?'); command = command.substr(1).toLowerCase();
} catch (error) {
console.error(error); switch (command) {
case 'ping':
ping(message);
break;
case 'source':
source(message);
break;
case 'whoami':
whoami(message);
break;
default:
await message.channel.send('Ye kya kuch bhi bolega lavde?');
} }
// if (message.content.toLowerCase().includes('ping')) {
// message.channel.send('PONG MOMO'); // if (args.charAt(0) !== '!') return;
// return; // here the command repfix is proper
// }
// if (message.content.toLowerCase().includes('allah')) {
// message.channel.send('Allah says alcohol is allowed as per Shatterdome senpai');
// return;
// }
// if (message.content.toLowerCase().includes('whoami')) {
// await message.channel.send('I am a worthless piece of garbage but still better than Kachra Seth ;) <@465447490192146442>');
// console.log('Reply was sent!');
// return;
// }
// if (message.content.toLowerCase() === '%source') {
// message.channel.send('Find the code for this abomination at https://git.rip/radicalpubes/tint ');
// return;
// }
}; };
module.exports = async (msg) => {
await msg.channel.send('Pong');
console.log('Sent pong!');
};
module.exports = async (msg) => {
await msg.channel.send('My code is maintained by radical and alphis senpai at https://git.rip/radicalpubes/tint');
console.log('Sent source!');
};
module.exports = async (msg) => {
await msg.channel.send('I\'m not tony ok.\nThat\'s all you need to know. :)');
console.log('Sent whoami!');
};