daily pastebin goal
89%
SHARE
TWEET

Untitled

a guest Jan 16th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js');
  2. const ExpressionEngine = require('ee.js')
  3. const striptags = require('striptags');
  4.  
  5. // Create an instance of a Discord client
  6. const discord = new Discord.Client();
  7. const client = new ExpressionEngine();
  8.  
  9. discord.on('ready', () => {
  10.   ee.on("ChatMessage", (message, color) => {
  11.     if (message.startsWith("[Allegiance]")) {
  12.         discord.send(striptags(message.replace("[Allegiance]", "")));
  13.     }
  14.   })
  15. });
  16.  
  17. // Create an event listener for messages
  18. discord.on('message', message => {
  19.   ee.InvokeChatParser(message.content)
  20. });
  21.  
  22. // Log our bot in using the token from https://discordapp.com/developers/applications/me
  23. discord.login('your token here');
  24.  
  25. return ee.register();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top