|
5 | 5 | import framework.isobot.colors |
6 | 6 | import framework.isobank.authorize |
7 | 7 | import framework.isobank.manager |
| 8 | +import framework.isobot.embedengine |
8 | 9 | import discord |
9 | 10 | from discord.ext import commands, tasks |
10 | 11 | from discord.ext.commands import * |
@@ -993,6 +994,23 @@ async def repo(ctx:SlashContext): |
993 | 994 | localembed = discord.Embed(title="Source-code Repositories", description="See and contribute to **isobot lazer's [GitHub repository](https://github.com/PyBotDevs/isobot-lazer)**\nSee our **[GitHub organization](https://github.com/PyBotDevs)**", color=discord.Color.random()) |
994 | 995 | await ctx.send(embed=localembed) |
995 | 996 |
|
| 997 | +@slash.slash( |
| 998 | + name="embedbuilder", |
| 999 | + description="Builds a custom embed however you want", |
| 1000 | + options=[ |
| 1001 | + create_option(name="title", description="The title of the embed", option_type=3, required=True), |
| 1002 | + create_option(name="description", description="The body of the embed", option_type=3, required=True), |
| 1003 | + create_option(name="image_url", description="The main image you want to show for the embed (URL ONLY)", option_type=3, required=False), |
| 1004 | + create_option(name="thumbnail_url", description="The thumbnail image you want to show for the embed (URL ONLY)", option_type=3, required=False), |
| 1005 | + create_option(name="color", description="The embed's accent color (Use -1 for random color)", option_type=4, required=False), |
| 1006 | + create_option(name="footer_text", description="The text at the footer of the embed", option_type=3, required=False), |
| 1007 | + create_option(name="footer_icon_url", description="The icon you want to show in the embed (URL ONLY)", option_type=3, required=False) |
| 1008 | + ] |
| 1009 | +) |
| 1010 | +async def embedbuilder(ctx:SlashContext, title: str, description: str, image_url: str = None, thumbnail_url: str = None, color: int = None, footer_text: str = None, footer_icon_url: str = None): |
| 1011 | + await ctx.send("Embed Built!", hidden=True) |
| 1012 | + await ctx.channel.send(embed=framework.isobot.embedengine.embed(title, description, image=image_url, thumbnail=thumbnail_url, color=color, footer_text=footer_text, footer_img=footer_icon_url)) |
| 1013 | + |
996 | 1014 | @slash.slash( |
997 | 1015 | name="isobank_register", |
998 | 1016 | description="Registers a new IsoBank account with your Discord ID", |
|
0 commit comments