Skip to content

Instantly share code, notes, and snippets.

@uutarou10 uutarou10/main.js
Created Jul 5, 2018

Embed
What would you like to do?
チャンネルが凍りつくSlack bot
const { RTMClient } = require('@slack/client');
const token = ENV.SLACK_TOKEN
const rtm = new RTMClient(token)
rtm.start();
rtm.on('message', event => {
messages = [
'黙れよ',
'ド素人が',
'消えろ',
'失せろ',
'人生やり直せ'
]
rtm.sendMessage(`<@${event.user}> ${messages[Math.floor(Math.random() * messages.length)]}`, event.channel);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.