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
// @ts-ignore | |
import { default as nacl } from 'tweetnacl-sealedbox-js'; | |
import { webcrypto } from 'crypto'; | |
function decodeUTF8(str: string): Uint8Array { | |
if (typeof str !== "string") | |
throw new TypeError("expected string"); | |
return new Uint8Array(unescape(encodeURIComponent(str)).split("").map(char => char.charCodeAt(0))); | |
} |
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) =>{ |