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

You need to sign in or sign up before continuing.
...
 
Commits (17)
module.exports = { module.exports = {
'env': { 'env': {
'commonjs': true, 'commonjs': true,
'es2020': true, 'es2020': true,
'node': true 'node': true
}, },
'extends': 'eslint:recommended', 'extends': 'eslint:recommended',
'parserOptions': { 'parserOptions': {
'ecmaVersion': 11 'ecmaVersion': 11
}, },
'rules': { 'rules': {
'indent': [ 'indent': [
'error', 'error',
'tab' 2
], ],
'linebreak-style': [ 'linebreak-style': [
'error', 'error',
'unix' 'unix'
], ],
'quotes': [ 'quotes': [
'error', 'error',
'single' 'single'
], ],
'semi': [ 'semi': [
'error', 'error',
'always' 'always'
] ]
} }
}; };
{
"editor.detectIndentation": false,
"editor.autoIndent": "advanced",
"editor.tabSize": 2,
"editor.insertSpaces": false
}
# TINT # TINT
Tint is node based Discord built using the discord.js npm library. Tint is a node based Discord bot built using the discord.js npm library.
For now, it does absolutely nothing. For now, it does absolutely nothing.
Thanks Thanks
\ No newline at end of file
This diff is collapsed.
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"main": "src/app.js", "main": "src/app.js",
"scripts": { "scripts": {
"lint": "eslint src/", "lint": "eslint src/",
"start:dev": "nodemon src/app.js",
"start": "node src/app.js" "start": "node src/app.js"
}, },
"author": "zeebhombal@gmail.com", "author": "zeebhombal@gmail.com",
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
"devDependencies": { "devDependencies": {
"eslint": "^7.7.0", "eslint": "^7.7.0",
"eslint-config-airbnb-base": "^14.2.0", "eslint-config-airbnb-base": "^14.2.0",
"eslint-plugin-import": "^2.22.0" "eslint-plugin-import": "^2.22.0",
"nodemon": "^2.0.4"
} }
} }
\ No newline at end of file
const Discord = require('discord.js'); const Discord = require('discord.js');
const commandHandler = require('./commands');
require('dotenv').config(); require('dotenv').config();
const client = new Discord.Client(); const client = new Discord.Client();
client.on('message', (message) => { client.on('message', commandHandler);
if (!message.content.startsWith('%')) return;
if (message.content.toLowerCase().includes('ping')) {
message.channel.send('PONG MOMO');
return;
}
if (message.content.toLowerCase().includes('allah')) {
message.channel.send('Allah says alcohol is allowed as per Shatterdome senpai');
return;
}
if (message.content.toLowerCase() === '%whoami') {
message.channel.send('I am a worthless piece of garbage but still better than Kachra Seth @Alphis ;)');
return;
}
if (message.content.toLowerCase() === '%source') {
message.channel.send('Find the code for this abomination at https://git.rip/radicalpubes/tint ');
return;
}
});
client.once('ready', () => { client.once('ready', () => {
console.log('Choo Choo madafaka I\'m ready'); console.log('Choo Choo madafaka I\'m ready');
}); });
client.login(process.env.BOT_TOKEN); client.login(process.env.BOT_TOKEN);
const source = require('./source');
const whoami = require('./whoami');
const ping = require('./ping');
module.exports = async (message) => {
// const guildId = '465448041286205443';
// const channelId = '735147889088528394';
// 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
let whiteSpaceRegex = /\s/i;
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 '!'
command = command.substr(1).toLowerCase();
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 (args.charAt(0) !== '!') return;
// here the command repfix is proper
};
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!');
};