我如何让机器人自聋? [英] How would I make a bot self deafen itself?

查看:13
本文介绍了我如何让机器人自聋?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正试图让机器人在加入语音频道后立即聋.我试过了

I am currently trying to make the bot deafen itself as soon as it joins into a voice channel. I've tried

client.ws.voice.setSelfDeaf(true)

我也被告知要使用

client.ws.send()

但我不知道如何使用它.有什么办法可以吗?

but I have no idea how to use it. Is there any way I could do it?

推荐答案

client.ws.voiceclient.ws.send() 不是一个东西.

client.ws.voice and client.ws.send() are not a thing.

您需要做的是使用 voice.setSelfDeaf(true) 当机器人加入语音频道时.

What you need to do is to use voice.setSelfDeaf(true) when the bot joins a voice channel.

voiceChannel.join()
  .then(connection => {
      connection.voice.setSelfDeaf(true);
  });

这篇关于我如何让机器人自聋?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆