Skip to content

Commit

Permalink
Merge pull request #1 from bentettmar/bentettmar-examples-1
Browse files Browse the repository at this point in the history
Add embed cmd example.
  • Loading branch information
bennyscripts authored Mar 29, 2022
2 parents 513c42b + 625c9fa commit 1a3e27e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/embed_cmd.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from click import command
import discord_self_embed
from discord.ext import commands

bot = commands.Bot(command_prefix=".", self_bot=True)

@bot.event
async def on_ready():
print("ready")

@bot.command(name="embed")
async def embed_cmd(ctx):
embed = discord_self_embed.Embed("discord.py-self_embed", description="A way for selfbots to send embeds again.", colour="ff0000", url="https://github.com/bentettmar/discord.py-self_embed")
embed.set_author("Ben Tettmar")

await ctx.send(embed.generate_url(hide_url=True)) # You can also send the embed converted to a string which will auto hide the url.

bot.run("TOKEN_HERE")

0 comments on commit 1a3e27e

Please sign in to comment.