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

Channel switch #24

Merged
merged 5 commits into from
Oct 23, 2020
Merged

Channel switch #24

merged 5 commits into from
Oct 23, 2020

Conversation

kripton
Copy link
Contributor

@kripton kripton commented Oct 22, 2020

Some fixes from @jsjb (Update deps, switch from node-opus to @discordjs/opus, fix buffer warnings) and add a new method to the client to be able to switch channels.

@Gielert : Feel free to cherry-pick only the last commit if you do not want to check the others. Would be nice though :)

Example how to switch channels:

client.on('ready', info => {
  console.log('Connected to Mumble server:', info);
  console.log('===== Channels: =====\n', client.channels);
  console.log('=====');

  // Find the correct channel and switch if found
  for (var [key, value] of client.channels) {
    console.log(key + " = ", value.name);
    if (value.name === 'MyBelovedChannel') {
      console.log('Switching :)');
      client.switchChannel(key);
    }
  }
});

@kripton kripton mentioned this pull request Oct 22, 2020
@Gielert
Copy link
Owner

Gielert commented Oct 23, 2020

Looks good! Thanks for the PR :D

@Gielert Gielert merged commit 2f71188 into Gielert:master Oct 23, 2020
@kripton kripton deleted the ChannelSwitch branch October 23, 2020 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants