Ask coding questions

← Back to all posts
Error with importing of commands discord bot (python)
codeMusicGame (0)

Having a problem with being able to post an embed using a command.

bot = discord.ext.commands.Bot(command_prefix = "--");

@bot.command()
async def sendembed(ctx):
embed = discord.Embed(
title = 'Title',
description = 'this is a description.',
colour = discord.Colour.blue()
)

embed.set_footer(text='gaming get ready.')
embed.set_image(url='https://barkndog.files.wordpress.com/2021/01/cropped-iconcmg.png')
embed.set_thumbnail(url='https://barkndog.files.wordpress.com/2021/02/hacker_png23-1.png')
embed.set_author(name='Author Name',on_url='https://barkndog.files.wordpress.com/2021/02/xcorvidae.jpg?resize=214%2C214')
embed.add_field(name='field Name', value='field Value', inline=False)
await ctx.send(embed=embed)