Skip to content

Instantly share code, notes, and snippets.

@shipof123
Created December 6, 2018 11:33
Show Gist options
  • Save shipof123/72d0ae4052f232dc7672500a295ef76e to your computer and use it in GitHub Desktop.
Save shipof123/72d0ae4052f232dc7672500a295ef76e to your computer and use it in GitHub Desktop.
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