我的selfbot只回应我,不回应其他用户



我运行代码并发送"xd", selfbot回复"lmao",但如果另一个用户写"xd", selfbot不回复"lmao",我该怎么做才能使它响应任何用户或bot?

import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
#TOKEN
TOKEN = "u token"
client = discord.Client()
b = Bot(command_prefix = "x")
@b.event
async def on_ready():
print("I ready")
@b.event
async def on_message(message):
if message.content == "xd":
await message.channel.send("lmao")
b.run(TOKEN, bot = False)

你不能再为命令设置on_message了所以我建议你这样做

@b.command()
async def xd(ctx):
await ctx.send("lmao")

self botting is against discord TOS

最新更新