How To Get A Discord Bot To Output Everything User Inputs Instead Of Just The First Input?
I'm trying to get a bot that will repeat what a user inputs, as many times as the user specifies. The issue I'm running into is that if the user types: !repeat 5 x y, the bot will
Solution 1:
You can use the keyword-only argument syntax and do something like
@bot.command()
async def repeat(times: int, *,content="Repeating..."):
for i in range(times):
if times > 10:
await bot.say("Cannot spam more than 10 messages at a time.")
return
else:
await bot.say(content)
Post a Comment for "How To Get A Discord Bot To Output Everything User Inputs Instead Of Just The First Input?"