【发布时间】:2021-05-22 18:49:46
【问题描述】:
我想在代码中添加用户名或 ID,以便当我(或其他人)执行 .d @username 时,selfbot 会执行整个“.accept”和“u 4”响应。
代码:
import discord
import os
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
client = discord.Client()
b = Bot(command_prefix = ".d")
@b.event
async def on_ready():
print("rdy")
@b.event
async def on_message(message)
if message.content == ".d":
await message.channel.send(".accept")
await message.channel.send("u 4")
b.run(os.getenv("TOKEN"), bot = False)
【问题讨论】:
标签: python python-3.x discord discord.py bots