Created
December 6, 2018 11:33
-
-
Save shipof123/72d0ae4052f232dc7672500a295ef76e 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
const readline = require('readline') | |
const Discord = require('discord.js'); | |
const client = new Discord.Client(); | |
var rl = readline.createInterface({ | |
input : process.stdin, | |
output : process.stdout, | |
terminal : false | |
}); | |
var main_channel; | |
rl.on('line', input => { | |
main_channel.send(input); | |
}); | |
client.on('ready', () => { | |
console.log(`We're in boyz\n Login: ${client.user.tag}`); }); | |
client.on('message', msg => { | |
main_channel = msg.channel; | |
console.log(`${msg.author.tag}> ${msg.content}`); | |
}); | |
token = "-Your_Token_Here-"; | |
client.login(token); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment