@@ -11,6 +11,7 @@ class ui(commands.Cog):
11
11
def __init__ (self , bot ):
12
12
self .bot = bot
13
13
14
+ @commands .check_any (commands .is_owner (), commands .has_permissions (administrator = True ))
14
15
@commands .command (name = 'list' , aliases = ['scoreboards' , 'sbs' , 'list_scoreboards' ])
15
16
async def list_scoreboards (self , ctx ):
16
17
embed = discord .Embed ()
@@ -208,6 +209,7 @@ def validate_server_id():
208
209
server_id = int (server_id )
209
210
return server_id
210
211
212
+ @commands .check_any (commands .is_owner (), commands .has_permissions (administrator = True ))
211
213
@commands .command (name = 'create' , aliases = ['create_sb' , 'create_scoreboard' , 'add' , 'add_sb' , 'add_scoreboard' ])
212
214
async def create_scoreboard (self , ctx ):
213
215
@@ -254,6 +256,7 @@ async def get_scoreboard(self, ctx, message, return_index=False):
254
256
raise commands .BadArgument ('No scoreboard found with message id %s' % message )
255
257
return (sb , i ) if return_index else sb
256
258
259
+ @commands .check_any (commands .is_owner (), commands .has_permissions (administrator = True ))
257
260
@commands .command (name = 'delete' , aliases = ['delete_sb' , 'delete_scoreboard' , 'remove' , 'remove_sb' , 'remove_scoreboard' ])
258
261
async def delete_scoreboard (self , ctx , message ):
259
262
sb = await self .get_scoreboard (ctx , message )
@@ -272,6 +275,7 @@ async def delete_scoreboard(self, ctx, message):
272
275
embed .set_author (name = f"Scoreboard deleted" , icon_url = "https://cdn.discordapp.com/emojis/809149148356018256.png" )
273
276
await ctx .send (embed = embed )
274
277
278
+ @commands .check_any (commands .is_owner (), commands .has_permissions (administrator = True ))
275
279
@commands .group (name = 'set' , aliases = ['edit' , 'update' , 'set_scoreboard' , 'edit_scoreboard' , 'update_scoreboard' ], invoke_without_command = False )
276
280
async def set_scoreboard (self , ctx , message , option : str ):
277
281
sb , sb_index = await self .get_scoreboard (ctx , message , return_index = True )
0 commit comments