不和谐语音通道链接

时间:2020-11-12 17:41:25

标签: python discord

我正在尝试制作一个漫游器,如果您在语音通道中,并且在广告通道中键入命令,则会在该广告通道中链接到您的语音通道,以供人们点击并将其带入语音频道,这是我到目前为止所拥有的

import discord
from discord.ext import commands

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


@client.command()   
async def invite(ctx):
    link = await VoiceState.channel.invite(max_age = 300)
    await ctx.send("Here is an instant invite to your server: " + link)

there is this error discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'VoiceState' is not defined

我不知道如何获取剩余的代码或如何解决现在的问题。

0 个答案:

没有答案