【发布时间】:2018-07-28 13:28:36
【问题描述】:
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import asyncio
import time
bot = commands.Bot(command_prefix='$')
@bot.event
async def on_ready():
print ("Ready")
@bot.command(pass_context=True)
async def Move(ctx):
#channel to move to '414543063575429131'
#user to move '192361974053470208'
await bot.move_member('192361974053470208', '414543063575429131')
print("done")
bot.run("token_here")
这是我的代码,但是当我尝试移动用户时,它给了我错误“提供的频道必须是语音频道”。
我知道机器人可以正常工作,因为我之前有一些简单的命令可以更早地回复消息并且它们运行良好。
我是 python 和不和谐机器人的新手,所以我真的不知道该怎么做。任何帮助表示赞赏。
【问题讨论】:
标签: python discord discord.py