Ehh, discord embeds wont work? :/
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")
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 XDahkid7674
I cant help you because you actually put the code here instead of linking the repl.. also i know nothing about discord bots
idksolol
@JULIODIAZ1 ty for the tip man :)
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.
@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.
@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??
Here's the working version:
https://replit.com/@Kai_Justice/Client-test-30-1
@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