question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discord Embeds - Editing

See original GitHub issue

When trying to edit an embed:

@client.command()
 async def ping(self):
        """Pings the bot"""
        pingtime = time.time()
        e = discord.Embed(title="Pinging...", colour=0xFF0000)
        await self.bot.say(embed=e)
        ping = time.time() - pingtime
        complete = "Pong, %.01f seconds" % ping
        em = discord.Embed(title=complete, colour=0xFF0000)
        await self.bot.edit_message(e, embed=em)```

I get the following error:

AttributeError: 'Embed' object has no attribute 'channel'

But I have no clue how to fix it. Could you please help.. ^Shiney

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

50reactions
Fuyukaicommented, Aug 13, 2017

No, please read the docs. If you want help, the place is the API server linked in the README, not GitHub issues. These are for issues with the library.

17reactions
Rapptzcommented, Aug 14, 2017

The answer given by Bluescream is right.

You get the message object via the return of e.g. await bot.say. Then you pass it to bot.edit_message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Edit embed discord | Without dashboard | Carl bot - YouTube
is video for how to create embed without using bot dashboard. ... Edit embed discord | Without dashboard | Carl bot | Discord...
Read more >
Discord.js - how do I edit message.embed() statements?
I am making a ping command - It is very simple to code, but I haven't got the slightest idea how to edit...
Read more >
Discohook
The easiest way to personalise your Discord server. ... which allows services like Discohook to send any messages with embeds to your server....
Read more >
Move '(edited)' above messages with only embeds – Discord
For bots that use and edit embeds in their commands, it would be nice if the edited indicator were placed above the message...
Read more >
Discord Embed Generator
Embed Editor. Use variables (will skip field checks and direcly add names without doublequotes). Basic settings. Color. Thumbnail settings. Author settings.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found