From 73fc21a12855a95772f781c4379c6048ae6aef64 Mon Sep 17 00:00:00 2001 From: Shane Date: Wed, 9 Apr 2025 08:12:11 -0700 Subject: [PATCH 1/2] added command for hello to send rich text (embed) message --- src/innieme/discord_bot.py | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/innieme/discord_bot.py b/src/innieme/discord_bot.py index cc84353..bbb4343 100644 --- a/src/innieme/discord_bot.py +++ b/src/innieme/discord_bot.py @@ -1,7 +1,7 @@ from .discord_bot_config import DiscordBotConfig from .innie import Innie, Topic -from discord import Message, Intents, ChannelType, NotFound, File, TextChannel +from discord import Message, Intents, ChannelType, NotFound, File, TextChannel, Embed, Color from discord.ext import commands import logging @@ -64,7 +64,34 @@ async def quit(ctx): return await ctx.send("Goodbye! Bot shutting down...") await self.bot.close() - + + @self.bot.command(name='hello') + async def hello(ctx): + # Create an embed (this is Discord's rich text format) + embed = Embed( + title="InnieMe: Your Knowledge Speaks for Itself", + description="Democratizes access to AI-powered Q&A capabilities", + color=Color.blue(), + url="https://github.com/wolfdancer/innieme" # Clickable link on the title + ) + + # Add fields to the embed + embed.add_field(name="Pricing", value="Free during early access", inline=False) + embed.add_field(name="Key Feature", value="Ask and you shall receieve", inline=True) + embed.add_field(name="Deployment", value="Server/channel specific", inline=True) + + # Add a footer + embed.set_footer(text="InnieMe @ 2025") + + # Set a thumbnail image (small image in the corner) + embed.set_thumbnail(url="https://repository-images.githubusercontent.com/956066438/8dce1cee-0386-423d-817c-283e3dfb7288") + + # Set a large image + # embed.set_image(url="https://repository-images.githubusercontent.com/956066438/8dce1cee-0386-423d-817c-283e3dfb7288") + + # Send the embed + await ctx.send(embed=embed) + def _identify_topic(self, channel_id) -> Optional[Topic]: topics = self.channels.get(channel_id, []) return topics[0] if topics else None From d99ef9f63cf9e10721599de9d2c18921c4ecd454 Mon Sep 17 00:00:00 2001 From: Shane Date: Wed, 9 Apr 2025 08:20:12 -0700 Subject: [PATCH 2/2] removed the requirement for uuid as that is somehow breaking the github act build now. --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 94ff870..a3de4e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,4 +26,3 @@ pytest-asyncio>=0.21.0 # Utilities numpy>=1.24.0 -uuid>=1.30