2525}
2626
2727def create_footer (embed , client ):
28- embed .set_footer (text = f"{ client .user .name } | ver. 1.0.6 " , icon_url = client .user .avatar .url )
28+ embed .set_footer (text = f"{ client .user .name } | ver. 1.0.7 " , icon_url = client .user .avatar .url )
2929
3030async def init_db ():
3131 db = await aiosqlite .connect ('fixembed_data.db' )
@@ -151,10 +151,26 @@ async def disable(interaction: discord.Interaction,
151151
152152@client .tree .command (
153153 name = 'about' ,
154- description = "Show information about the bot or a specific channel" )
155- @app_commands .describe (channel = "The channel to show information about" )
156- async def about (interaction : discord .Interaction ,
157- channel : Optional [discord .TextChannel ] = None ):
154+ description = "Show information about the bot" )
155+ async def about (interaction : discord .Interaction ):
156+ # Set embed color to Discord purple
157+ embed = discord .Embed (
158+ title = "About" ,
159+ description = "This bot fixes the lack of embed support in Discord." ,
160+ color = discord .Color (0x7289DA ))
161+ embed .add_field (
162+ name = "Links" ,
163+ value =
164+ ("- [Invite link](https://discord.com/api/oauth2/authorize?client_id=1173820242305224764&permissions=274877934592&scope=bot+applications.commands)\n "
165+ "- [Tog.gg Page](https://top.gg/bot/1173820242305224764) (please vote!)\n "
166+ "- [Source code](https://github.com/kenhendricks00/FixEmbedBot) (please leave a star!)\n "
167+ "- [Support server](https://discord.gg/QFxTAmtZdn)" ),
168+ inline = False )
169+ create_footer (embed , client )
170+ await interaction .response .send_message (embed = embed )
171+
172+ # Debug command
173+ async def debug_info (interaction : discord .Interaction , channel : Optional [discord .TextChannel ] = None ):
158174 # If no channel is specified, use the current channel
159175 if not channel :
160176 channel = interaction .channel
@@ -167,14 +183,14 @@ async def about(interaction: discord.Interaction,
167183
168184 # Set embed color to Discord purple
169185 embed = discord .Embed (
170- title = "About " ,
171- description = "This bot fixes the lack of embed support in Discord. " ,
186+ title = "Debug Information " ,
187+ description = "For more help, join the [ support server](https://discord.gg/QFxTAmtZdn) " ,
172188 color = discord .Color (0x7289DA ))
173189 embed .add_field (name = "Ping" ,
174190 value = f"{ round (client .latency * 1000 )} ms" ,
175191 inline = False )
176192 embed .add_field (
177- name = "Debug info " ,
193+ name = "Status and Permissions " ,
178194 value =
179195 (f'{ f"🟢 **FixEmbed working in** { channel .mention } " if fix_embed_status else f"🔴 **FixEmbed not working in** { channel .mention } " } \n '
180196 f"- { '🟢 FixEmbed enabled' if fix_embed_status else '🔴 FixEmbed disabled' } \n "
@@ -184,16 +200,8 @@ async def about(interaction: discord.Interaction,
184200 f"- { '🟢' if permissions .manage_messages else '🔴' } Manage messages permission"
185201 ),
186202 inline = False )
187- embed .add_field (
188- name = "Links" ,
189- value =
190- ("- [Invite link](https://discord.com/api/oauth2/authorize?client_id=1173820242305224764&permissions=274877934592&scope=bot+applications.commands)\n "
191- "- [Tog.gg Page](https://top.gg/bot/1173820242305224764) (please vote!)\n "
192- "- [Source code](https://github.com/kenhendricks00/FixEmbedBot) (please leave a star!)\n "
193- "- [Support server](https://discord.gg/QFxTAmtZdn)" ),
194- inline = False )
195203 create_footer (embed , client )
196- await interaction .response .send_message (embed = embed )
204+ await interaction .response .send_message (embed = embed , view = SettingsView ( interaction ) )
197205
198206# Dropdown menu for settings
199207class SettingsDropdown (ui .Select ):
@@ -212,7 +220,12 @@ def __init__(self, interaction):
212220 discord .SelectOption (
213221 label = "Service Settings" ,
214222 description = "Configure which services are enabled" ,
215- emoji = "⚙️" )
223+ emoji = "⚙️" ),
224+ discord .SelectOption (
225+ label = "Debug" ,
226+ description = "Show current debug information" ,
227+ emoji = "🐞"
228+ )
216229 ]
217230 super ().__init__ (placeholder = "Choose an option..." ,
218231 min_values = 1 ,
@@ -246,6 +259,8 @@ async def callback(self, interaction: discord.Interaction):
246259 color = discord .Color .blurple ())
247260 view = ServiceSettingsView (self .interaction )
248261 await interaction .response .send_message (embed = embed , view = view )
262+ elif self .values [0 ] == "Debug" :
263+ await debug_info (interaction , interaction .channel )
249264
250265class ServicesDropdown (ui .Select ):
251266
@@ -303,7 +318,6 @@ async def callback(self, interaction: discord.Interaction):
303318 except discord .errors .NotFound :
304319 logging .error ("Failed to edit original response: Unknown Webhook" )
305320
306-
307321class SettingsView (ui .View ):
308322
309323 def __init__ (self , interaction ):
@@ -382,7 +396,6 @@ async def on_timeout(self):
382396 except discord .errors .NotFound :
383397 logging .error ("Failed to edit original response on timeout: Unknown Webhook" )
384398
385-
386399# Settings command
387400@client .tree .command (name = 'settings' , description = "Configure FixEmbed's settings" )
388401async def settings (interaction : discord .Interaction ):
0 commit comments