Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. const Discord = require("discord.js");
  2.  
  3.  
  4. exports.run = function (bot, message, args) {
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. let voiceChannel = message.member.voiceChannel;
  12. voiceChannel.join().then(connection => {
  13.  
  14.  
  15.  
  16. const dispatcher = connection.playFile('C:/Users/fireb/Desktop/Bot&Dev/Wraith-Bot/resources/audio/sexual.mp3');
  17.  
  18.  
  19.  
  20. dispatcher.on("end", end => {
  21.  
  22.  
  23. setTimeout(function afterTwoSeconds() {
  24.  
  25. voiceChannel.leave();
  26. }, 27000)
  27.  
  28.  
  29.  
  30.  
  31.  
  32. });
  33. }).catch(err => console.log(err));
  34. isReady = true;
  35.  
  36.  
  37.  
  38. setTimeout(function afterTwoSeconds() {
  39. message.delete().catch();
  40. let first = message.channel.send(":arrow_forward: **Audio played** Sexual!")
  41. }, 1000)
  42.  
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement