aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-19 13:10:39 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-19 13:10:39 -0400
commit3602700e53a819fcf92d86d9fb27bd100f8ab720 (patch)
tree1017e7bad13d52bd8d0d2cd21b7bb3ac54f27b0b /bot.js
parent33c1efcc7b9914529af8c690e8757887365461cc (diff)
downloadDLAP-3602700e53a819fcf92d86d9fb27bd100f8ab720.tar.gz
DLAP-3602700e53a819fcf92d86d9fb27bd100f8ab720.tar.bz2
DLAP-3602700e53a819fcf92d86d9fb27bd100f8ab720.zip
Removed playAudio function for now
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/bot.js b/bot.js
index 3d56dd3..52fe8b3 100644
--- a/bot.js
+++ b/bot.js
@@ -5,19 +5,14 @@ const fs = require('fs');
let prefix = "!";
var voiceChannel = "734184921433899108";
-function playAudio() {
- console.log("Play Audio Function Activated.")
-}
-
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
console.log('Prefix:', prefix);
const channel = client.channels.cache.get(voiceChannel);
if (!channel) return console.error("The channel does not exist!");
channel.join().then(connection => {
- // Yay, it worked!
console.log("Successfully connected to this channel.");
- playAudio()
+ connection.play('./music/4616-werq-by-kevin-macleod.mp3');
}).catch(e => {
// Oh no, it errored! Let's log it to console :)
console.error(e);
@@ -46,10 +41,7 @@ client.on('message', async msg => {
if (command == 'join') {
// Only try to join the sender's voice channel if they are in one themselves
console.log("Connected to voice chat...")
- const connection = await msg.member.voice.channel.join(734184921433899108);
- playAudio();
- connection.play('./music/4616-werq-by-kevin-macleod.mp3');
- console.log(connection)
+ const connection = await msg.member.voice.channel.join();
}
if (command == 'skip') {
//TODO