首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不加入语音信道的Discord.py重写机器人

不加入语音信道的Discord.py重写机器人
EN

Stack Overflow用户
提问于 2022-09-18 13:37:30
回答 1查看 30关注 0票数 -2

因此,我尝试了大多数堆栈溢出帖子的解决方案,但都没有奏效。

代码语言:javascript
复制
async def join(ctx):
    destination = ctx.author.voice.channel
    if ctx.voice_state.voice:
        await ctx.voice_state.voice.move_to(destination)
        return
    
    ctx.voice_state.voice = await destination.connect()
    await ctx.send(f"Joined {ctx.author.voice.channel} Voice Channel")```
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-09-19 14:35:37

让一个机器人加入你的声音频道,

代码语言:javascript
复制
async def join(ctx):
   vc = ctx.author.voice.channel
   await vc.connect()
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73763239

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档