Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as Eris from 'eris'
- const token = "redacted"
- const bot = new Eris.Client(token);
- bot.connect().then(() => {
- console.log('Connected')
- bot.on("messageCreate",async msg => {
- if(msg.member === undefined || msg.member.voiceState.channelID === undefined)
- return;
- const vc = await bot.joinVoiceChannel(msg.member.voiceState.channelID);
- console.log("Joined voice")
- const vds = vc.receive("opus");
- vds.on('data', stuff => {
- console.log(stuff)
- });
- });
- console.log(bot.guilds.size)
- })
- process.on('SIGINT', function() {
- console.log("Caught interrupt signal");
- bot.disconnect({reconnect:false});
- process.exit();
- });
Add Comment
Please, Sign In to add comment