Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I make My Bot Join a Voice Channel #1572

Closed
1 task
VolleyGod opened this issue Jun 8, 2017 · 6 comments
Closed
1 task

How do I make My Bot Join a Voice Channel #1572

VolleyGod opened this issue Jun 8, 2017 · 6 comments

Comments

@VolleyGod
Copy link

Please describe the problem you are having in as much detail as possible:
First off, I know this isn't a issue but no one else wants to help. I don't even know where to start on how to make my bot join a voice channel. I went to hydrabolt's discord server but they said i look it up. But there are no clear answers. It would be great if anyone could help me with the code. Here's what i have:
Include a reproducible code sample here, if possible:

const Discord = require("discord.js");
const client = new Discord.Client();
const fs = require("fs")
const snekfetch = require("snekfetch");
const broadcast = client.createVoiceBroadcast();

client.login(im smart enough to know not to put that in);

client.on('message', message => {
  if (message.content === '*join') {
      client.joinVoiceChannel('322273089138196490')
 .then(connection => console.log('Connected!'))
 .catch(console.error);
 message.reply('OK')
 broadcast.playFile('./music.mp3');
for (const connection of client.voiceConnections.values()) {
  connection.playBroadcast(broadcast);
}}
    }
)

Further details:

  • discord.js version: idk
  • node.js version: v.6.10.2
  • Operating system: Windows 7
  • Priority this issue should have – please be realistic and elaborate if possible: How to join a voice channel
  • I have also tested the issue on latest master, commit hash:
@DevYukine
Copy link
Contributor

DevYukine commented Jun 8, 2017

look in examples from the docs maybe?

@VolleyGod
Copy link
Author

you know i was there

@VolleyGod
Copy link
Author

and does anyone see any problems with my code?

@DevYukine
Copy link
Contributor

yes but you know the rules there?

rule 2 apply here

@VolleyGod
Copy link
Author

I GOOGLED IT AND NOTHING WORKED
SO IF YOU KNOW PLEASE JUST TELL ME.
IF NOT THANK YOU FOR YOUR TIME.

@devsnek
Copy link
Member

devsnek commented Jun 8, 2017

Hello! The GitHub Issue Tracker is not for individual programming issues, as it says in the template you deleted. Please refer to the server, the link to which is here. Thank you for your understanding.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants