Skip to content
← Back to Community
Ehh, discord embeds wont work? :/
Profile icon
idksolol

So since the replit "update" with .env discord embeds wont work anymore. The codes are correct (no errors) but when I use the command wish would send the embed it sended " <discord.embeds.Embed.object at 0x7f4fba5350d0> " instead! Before the "update" it just worked, after it it wont. Can anyone help??

This is my code:

prfx = "!"

Help_embed = discord.Embed(
title = "an title",
discription = "an discription",
colour = discord.Colour.orange())
Help_embed.add_field(name = "an field name", value = "field value")

@client
.event
async def on_message(message):
if message.author == client.user:
return

msg = message.content

if msg.startswith(prfx + "help"):
await message.channel.send(Help_embed)

got ya

@JULIODIAZ1
XD

Answered by Kai_Justice [earned 5 cycles]
View Answer
Voters
Profile icon
hishamva
Profile icon
idksolol
Comments
hotnewtop
Profile icon
Kai_Justice

await message.channel.send(embed=Help_embed)
It's a kwarg. You have to specify that you're sending an embed a long with the message.

Profile icon
idksolol

@Kai_Justice thx man but it seems I can't run the script somehow! Do you mayby also know whats wrong? It has something to do with line 60:

if msg.startswith(prfx + "Shutdown"):

It gives the fellowing Error:

File "main.py", line 60
if msg.startswith(prfx + "Shutdown"):

(Arrow facing the ":" )
IndentationError: unindent does not match any outer indentation level.

Profile icon
Kai_Justice

@idksolol
That means your indentation is different for the line before or after, if this pops up randomly I usually just re-indent the whole script just to be sure it doesn't happen again.

Profile icon
idksolol

@Kai_Justice I just re-indent the script, double checked it but I still cannot find whats wrong, can you may see in my script wats wrong??

Profile icon
Kai_Justice

@idksolol
I re-indented it all and it worked fine for me.
Here's the working version:
https://replit.com/@Kai_Justice/Client-test-30-1

Profile icon
idksolol

@Kai_Justice Thank you verry much man, the bot is working fine now and I even got an bether embed tho! New lession learned XD

Profile icon
idksolol

*since

Profile icon
ahkid7674

upvote this man

Profile icon
ahkid7674

I cant help you because you actually put the code here instead of linking the repl.. also i know nothing about discord bots

Profile icon
idksolol

@JULIODIAZ1
ty for the tip man :)

Profile icon
ahkid7674