我正在为一个服务器做一个自助机器人,我和一些irl朋友合作。 Atm我有点卡住了,不知道如何修复python代码。 机器人应该说“lmao”当我说“ayy”和“ayy”时我说“lmao” 只是一些有趣的事情:) 如果可能的话,我希望selfbot只回应我,而不回应其他人。在
import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
#TOKEN
TOKEN = "Token goes here"
client = discord.Client()
b = Bot(command_prefix = "ayy")
@b.event
async def on_ready():
print("ayy lmao")
@b.event
async def on_message(message):
if message.content == "ayy":
away.b.send_message(message.channel, "lmao")
b.run(TOKEN, bot = False)
错误:
^{pr2}$
我把第25行改成:
似乎正在工作:)
相关问题 更多 >
编程相关推荐