Python Forum

Full Version: [Discord.py] Editing messages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, so i got this code, and i can't get it to modify the bot's own message, can anyone help me with this ?
I want it to, when somebody sends "_test" that it responds "testing" bot then modifies it to "tester".

@client.command(pass_context=True)
async def test(ctx):
	await client.say('testing')
	await client.edit_message('tester')
Does that not work?  What does your code actually do?
Nevermind, i forgot to say that i don't need help anymore, i joined a python discord server and they told me how!
Ok, so what fixed it?  In case someone else stumbles upon this and wants to do the same thing :p
Sorry for late reply, i've been coding all day, so the thing is that you had to make the
message a variable, if thats what its called?

So like msg = await client.send_message("bla")
then you can edit_message(msg,"test")