Guest User

Untitled

a guest
Dec 13th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import * as Eris from 'eris'
  2.  
  3. const token = "redacted"
  4.  
  5. const bot = new Eris.Client(token);
  6. bot.connect().then(() => {
  7. console.log('Connected')
  8. bot.on("messageCreate",async msg => {
  9. if(msg.member === undefined || msg.member.voiceState.channelID === undefined)
  10. return;
  11. const vc = await bot.joinVoiceChannel(msg.member.voiceState.channelID);
  12. console.log("Joined voice")
  13. const vds = vc.receive("opus");
  14. vds.on('data', stuff => {
  15. console.log(stuff)
  16. });
  17. });
  18. console.log(bot.guilds.size)
  19. })
  20.  
  21. process.on('SIGINT', function() {
  22. console.log("Caught interrupt signal");
  23. bot.disconnect({reconnect:false});
  24. process.exit();
  25. });
Add Comment
Please, Sign In to add comment