From b8dc8b2b20b663a5a0736f213d600a794bf2e310 Mon Sep 17 00:00:00 2001 From: strNophix Date: Thu, 18 Nov 2021 23:01:04 +0100 Subject: [PATCH] Added owner checks for source command --- cogs/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cogs/settings.py b/cogs/settings.py index 725cf53..10387ba 100644 --- a/cogs/settings.py +++ b/cogs/settings.py @@ -43,6 +43,7 @@ class SettingsCog(BaseCog, name="Settings"): await AutoJoin.del_channel(ctx.redis, ctx.guild.id) await EmbedGenerator.Message(ctx, "Autojoin", "`disabled`") + @commands.is_owner() @commands.group( name="source", aliases=["src"], @@ -57,6 +58,7 @@ class SettingsCog(BaseCog, name="Settings"): embed.description = f"```{prefix}source list\n{prefix}source add \n{prefix}source remove \n{prefix}source sync```" await ctx.send(embed=embed) + @commands.is_owner() @source.command(name="remove") async def source_remove(self, ctx: CustomContext, source_url: str): """Removes a source from the bot""" @@ -74,6 +76,7 @@ class SettingsCog(BaseCog, name="Settings"): embed.title = "Could not remove source, the specified source might not exist" await ctx.send(embed=embed) + @commands.is_owner() @source.command(name="add") async def source_add(self, ctx: CustomContext, source_url: str): """ @@ -109,6 +112,7 @@ class SettingsCog(BaseCog, name="Settings"): else: await ctx.send(embed=embed) + @commands.is_owner() @source.command(name="list", aliases=["ls"]) async def source_list(self, ctx: CustomContext): """Display a list of sources""" @@ -124,6 +128,7 @@ class SettingsCog(BaseCog, name="Settings"): embed.description = description await ctx.send(embed=embed) + @commands.is_owner() @source.command(name="sync") async def source_sync(self, ctx: CustomContext): """Forcefully resyncs all sources"""