【发布时间】:2018-08-29 18:56:37
【问题描述】:
我正在尝试使用 discord.py rewrite 制作一个 selfbot。
我在尝试创建简单命令时遇到问题。
我希望我的 selfbot 在发送“>>>test”时回复“oof”。
这是我的代码:
import asyncio
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix=(">>>"), self_bot=True)
@bot.event
async def on_ready():
print("Bot presence t u r n e d on ( ͡° ͜ʖ ͡°)")
@bot.command()
async def test(self, ctx):
await self.bot.say("oof")
bot.run("my token", bot=False)
【问题讨论】:
标签: python python-3.x discord.py