如何让discord bot断开用户与语音聊天的连接?

时间:2021-05-12 15:13:50

标签: python

import discord
from discord.ext import commands
import random
import asyncio

client = commands.Bot(command_prefix= '+')

@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))
    await client.change_presence(status=discord.Status.offline)

@client.command()
async def kick(ctx, member : discord.Member):
    await member.disconnect()

client.run(<TOKEN>)

我想发出一个断开目标与语音聊天的命令,我应该使用什么或做什么?

1 个答案:

答案 0 :(得分:0)

您可以使用 this article 并将 None 传递给它以从语音频道中删除某人。