|
8 | 8 | from asyncio import TimeoutError |
9 | 9 | from discord import Message, Embed, Colour |
10 | 10 | from discord.ext.commands import Cog, command, Context |
| 11 | +from discord_slash.utils.manage_components import create_button, create_actionrow |
| 12 | +from discord_slash.model import ButtonStyle |
11 | 13 |
|
12 | 14 | from .utils.ratelimit import RateLimiter |
13 | 15 |
|
@@ -164,17 +166,17 @@ def pretty_print_messages(msgs): |
164 | 166 | embed.add_field(name='Hardware Check', inline=False, |
165 | 167 | value=' / '.join(hardware_check_msg)) |
166 | 168 |
|
167 | | - embed.add_field(name='Analyser Report', inline=False, |
168 | | - value=f'[**Click here for solutions / full analysis**]({anal_url})') |
169 | | - |
170 | 169 | # include filtered log in case SE or FTL spam is detected |
171 | 170 | if 'obsproject.com' in log_url and any(elem in log_content for |
172 | 171 | elem in self._filtered_log_needles): |
173 | 172 | clean_url = log_url.replace('obsproject.com', 'obsbot.rodney.io') |
174 | 173 | embed.description = f'*Log contains debug messages (browser/ftl/etc), ' \ |
175 | 174 | f'for a filtered version [click here]({clean_url})*\n' |
176 | 175 |
|
177 | | - return await msg.channel.send(embed=embed, reference=msg, mention_author=True) |
| 176 | + actions = create_actionrow(create_button(style=ButtonStyle.URL, url=anal_url, |
| 177 | + label=f'Solutions / Full Analysis')) |
| 178 | + |
| 179 | + return await msg.channel.send(embed=embed, reference=msg, mention_author=True, components=[actions]) |
178 | 180 |
|
179 | 181 | async def fetch_log_analysis(self, url): |
180 | 182 | async with self.bot.session.get('https://obsproject.com/analyzer-api/', |
|
0 commit comments