Reputation: 326
Is it possible to get the user's input and then return it? This is my concept:
@bot.command()
async def return(ctx, *msg):
await ctx.send(msg)
let's say that the user types: !return Some message specified by the user
but this returns: ('Some', 'message', 'specified', 'by', 'the', 'user')
So, is it possible to make it return: Some message specified by the user
?
Upvotes: 0
Views: 41
Reputation: 2613
You can use the *
separated with a comma to make this work:
@bot.command()
async def return(ctx, *, msg):
await ctx.send(msg)
Reference: Keyword only arguments
Upvotes: 1