【发布时间】:2021-05-11 12:28:17
【问题描述】:
我今天刚开始学py,想做一个使用args来选择的垃圾邮件命令
- 消息发送多少次
- 我想发送的垃圾邮件是什么
我尝试过使用其他代码并将它们弯曲到我需要的地方,但现在我卡住了:
import os
import discord
client = discord.Client()
@client.event
async def on_ready():
print(f'Connected to Discord!')
client.run('TOKEN HERE', bot=False)
bot = commands.Bot(command_prefix='.')
@bot.command(name='spam', help='Spams the input message for x number of times')
async def spam(ctx, amount, message):
所以我的想法是:.spam [amount of times] [message to spam]
谢谢:)
(这是一个自我机器人,但只是为了和朋友和东西混在一起,我完全意识到他们的后果,但这只是为了好玩)
【问题讨论】:
标签: python discord bots discord.py