-
-
Save Useems/350aaf2d1df6129eebb8d1c33be0b1bb to your computer and use it in GitHub Desktop.
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
var Eris = require('eris'); | |
var bot = new Eris("Mzk1NzMxNjI1MTIxNDE1MTY4.DSXJiQ.Zgm2qJPDVnRqSRI5hKQfLafN6dk"); | |
console.log("Connecting..."); | |
bot.on("ready", () =>{ | |
console.log("Sucess"); | |
}); | |
bot.on("messageCreate", (msg) =>{ | |
if(msg.content.indexOf(".msg") == 0){ | |
msg.delete() | |
msg.content=msg.content.replace('.msg','').toLowerCase().replace(/[^a-zA-Z.]/g,''); | |
var allmsg = "" | |
for (var i=0;i < msg.content.length; i++){ | |
allmsg = allmsg+":regional_indicator_"+msg.content[i]+": " | |
}; | |
bot.createMessage(msg.channel.id, allmsg); | |
} | |
if(msg.content.indexOf(".mention") == 0 && msg.author.id == "294919314442813440"){ | |
msg.delete() | |
bot.createMessage(msg.channel.id, "<@"+msg.mentions[0].id+">"); | |
} | |
}); | |
bot.connect(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment