diff --git a/seinatools/core.py b/seinatools/core.py index 6b795c6b..01184c99 100644 --- a/seinatools/core.py +++ b/seinatools/core.py @@ -151,6 +151,7 @@ async def on_red_api_tokens_update( await self.cog_load() @commands.is_owner() + @commands.bot_has_permissions(embed_links=True, add_reactions=True) @commands.command(name="spy") async def _spy( self, @@ -245,6 +246,7 @@ async def _spy( return @commands.is_owner() + @commands.bot_has_permissions(embed_links=True) @commands.group(name="botstat", aliases=["botstatset"], invoke_without_command=True) async def _botstat(self, ctx: commands.Context, /): """ @@ -310,6 +312,7 @@ async def _embed(self, ctx: commands.Context, true_or_false: bool): return await ctx.tick() @commands.is_owner() + @commands.bot_has_permissions(attach_files=True) @commands.command( name="screenshot", aliases=["ss"] ) # https://discord.com/channels/133049272517001216/133251234164375552/941197661426565150 @@ -333,7 +336,12 @@ async def _screenshot(self, ctx: commands.Context, url: str, wait: Optional[int] }, ) - await page.goto(url) + try: + await page.goto(url) + except Exception as e: + log.exception( + f"Something went wrong trying to fetch the url: {box(str(e), lang='py')}" + ) if wait != None: await page.wait_for_timeout(wait) @@ -419,6 +427,7 @@ async def _spotify(self, ctx: commands.Context, user: Optional[discord.Member] = if not token: await ctx.send("You have not provided an api key yet.") + return if not user: user: discord.Member = ctx.author