Answer the question
In order to leave comments, you need to log in
I can't figure out why discord.py is failing?
I have a code for spam messages:
@bot.command(pass_context=True)
async def spam(ctx, m):
await ctx.message.delete()
count = 0
while count < int(m):
await ctx.send("@everyone crush")
count += 1
Answer the question
In order to leave comments, you need to log in
Your team is doing great. Just when you call the command in the discord, indicate the number of messages.
Example: $spam 5
Also, in such cases it is better to use a for loop
@bot.command()
async def spam(ctx, m):
for i in range(int(m)):
await ctx.send("@everyone crush")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question