mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 19:07:52 +00:00
Added owner checks for source command
This commit is contained in:
@@ -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 <url>\n{prefix}source remove <url>\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"""
|
||||
|
||||
Reference in New Issue
Block a user