Skip to content

Instantly share code, notes, and snippets.

@angeloanan
Last active February 24, 2018 15:12
Show Gist options
  • Save angeloanan/a340b02b203bdfaf703543ced27b0675 to your computer and use it in GitHub Desktop.
Save angeloanan/a340b02b203bdfaf703543ced27b0675 to your computer and use it in GitHub Desktop.
'b' bot for /r/Indonesia Discord
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.
@angeloanan
Copy link
Author

angeloanan commented Feb 23, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment