我试图用discord.py编写一个简单的机器人提一个用户,所以我开始与乐趣命令,如刚刚拿到API的窍门 import discord
import asyncio
client = discord.Client()
@client.event
async def on_message(message):
# we do not want the bot to reply t
我知道这是非常糟糕的,但它的工作原理,这是我目前的知识完成这项工作的唯一途径。所以我在实践中寻找一种“更好”的方式来写这个。 基本上它显示了3个插槽的图像,这3个插槽使用SLOT_PATTERN中列出的随机图像更改图像。图像使用edit_message编辑之前的3个插槽图像,将其替换为给定列表中的随机图像。 import discord, asyncio, time, random
clien
我需要获取用户的下午通道才能看到我的机器人以前发送给该用户的消息。我已经从标准通道的命令消息中获得了其用户对象。 这是我到目前为止已经试过: @client.event
async def in_msg(msg):
user = msg.author
privateChannel = client.get_channel(user.id) # not working