Skip to content
← Back to Community
Discord.py logging messages
Profile icon
aleksat

I'm making an RPG bot and I need a way to get user information for a character creation. I currently have a command setup but idk how to make it log messages sent AFTER the command has been run.

P.S:it can't be ctx.message.content since that just logs the command itself and nothing more

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
lohvesttv
Profile icon
aleksat
Comments
hotnewtop
Profile icon
Coder100

Do you mean getting arguments?

@bot.command() async def yes(ctx, arg): await ctx.send(arg) print(arg) # blah blah blah

read more

I think it's pretty easy. Did that help?

Profile icon
aleksat

@Coder100 I'm sorry but I already know about the arguments. I need a way to log stuff sent AFTER the command so for instance
Message 1:issues the command
Message 2:yes
How do I print message 2?

Profile icon
Coder100

@aleksat ohh, so get a reply!!

Profile icon
Coder100

that won't be too hard either,
read this
@aleksat

Profile icon
aleksat

@Coder100 yeah but I can't use message.content since I can't pass message object into the command

Profile icon
Coder100

done, read my answer, did it work? @aleksat

Profile icon
Coder100

ctx.content iirc @aleksat

Profile icon
aleksat

@Coder100 sorry reply didn't load. I saw it now. It's currently 1:30am and I need to sleep so I'll check tommorow if that's okay with you

Profile icon
Coder100

ok gn! Also mark as correct answer? @aleksat

Profile icon
aleksat

@Coder100 I'll do that tmmr when I check cus I wouldn't want to be misleading if it's not what I'm looking for

Profile icon
Coder100

ah ok, well gn :) @aleksat

Profile icon
aleksat

@Coder100 just tested and it works fine..thanks for the help

Profile icon
Coder100