Last active
February 24, 2018 15:12
-
-
Save angeloanan/a340b02b203bdfaf703543ced27b0675 to your computer and use it in GitHub Desktop.
'b' bot for /r/Indonesia Discord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('[INFO] Loading...') | |
const Discord = require('discord.js') | |
const client = new Discord.Client() | |
client.on('ready', function () { | |
if (client.user.bot) throw new TypeError('User is not a bot') | |
console.log('[INFO] Bot is ready and running') | |
if (client.presences.status === 'offline') { | |
client.user.setPresence({status: 'invisible'}) | |
console.log('[INFO] User is offline, setting presence to invisible') | |
} | |
}) | |
client.on('message', (msg) => { | |
if (msg.author.id === '214907500175032350') { | |
console.log(`[${msg.author.tag}] ${msg.content}`) | |
if (msg.content === ':rooster: **_Bah-gawk!_**' || msg.content === ':penguin: **_Noot!_**' || msg.content === ':duck: **_Quack!_**' || msg.content === ':dove: **_Coo!_**') { | |
msg.channel.send('b') | |
console.log('[SENDER] \'b\'') | |
} | |
} | |
}) | |
// INSERT YOUR CLIENT TOKEN HERE | |
client.login('') | |
// PLEASE NOTE THAT | |
// I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about features included in the products you find here before flashing it! YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, i will laugh at you. Your warranty will be void if you tamper with any part of your device / software. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OI READ THIS BEFORE PROCEEDING
I am not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed. Please do some research if you have any concerns about features included in the products you find here before flashing it! YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, i will laugh at you. Your warranty will be void if you tamper with any part of your device / software.