Skip to content

Instantly share code, notes, and snippets.

@TomXV
Created January 21, 2022 16:30
Show Gist options
  • Save TomXV/4ead0b5d19088854bab2196098306219 to your computer and use it in GitHub Desktop.
Save TomXV/4ead0b5d19088854bab2196098306219 to your computer and use it in GitHub Desktop.
How To Embed
import discord
from discord.ext import commands
TOKEN = 'TOKEN HERE!'
client = commands.Bot(command_prefix='.')
@client.event
async def on_ready():
print("bot is ready.")
@client.command()
async def displayembed(ctx):
embed = discord.Embed(
title='Title',
description='This is a description.',
colour=discord.Colour.blue()
)
embed.set_footer(text='This is a footer.')
embed.set_image(url='https://media.discordapp.net/attachments/860875297419558912/860875514251051028/OIP.png')
embed.set_thumbnail(url='https://media.discordapp.net/attachments/860875297419558912/860875514251051028/OIP.png')
embed.set_author(name='Author Name',
icon_url='https://media.discordapp.net/attachments/860875297419558912/860875514251051028/OIP.png')
embed.add_field(name='Field Name', value='Field Value', inline=False)
embed.add_field(name='Field Name', value='Field Value', inline=True)
embed.add_field(name='Field Name', value='Field Value', inline=True)
await ctx.message.channel.send(embed=embed)
client.run(TOKEN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment