@@ -405,6 +405,7 @@ async def config(self, ctx):
405
405
await ctx .invoke (cmd , command = 'config' )
406
406
407
407
@config .command ()
408
+ @commands .is_owner ()
408
409
async def options (self , ctx ):
409
410
"""Return a list of valid config keys you can change."""
410
411
allowed = self .bot .config .allowed_to_change_in_command
@@ -415,6 +416,7 @@ async def options(self, ctx):
415
416
return await ctx .send (embed = embed )
416
417
417
418
@config .command ()
419
+ @commands .is_owner ()
418
420
async def set (self , ctx , key : str .lower , * , value ):
419
421
"""
420
422
Sets a configuration variable and its value
@@ -446,6 +448,7 @@ async def set(self, ctx, key: str.lower, *, value):
446
448
return await ctx .send (embed = embed )
447
449
448
450
@config .command (name = 'del' )
451
+ @commands .is_owner ()
449
452
async def del_config (self , ctx , key : str .lower ):
450
453
"""Deletes a key from the config."""
451
454
keys = self .bot .config .allowed_to_change_in_command
@@ -473,6 +476,7 @@ async def del_config(self, ctx, key: str.lower):
473
476
return await ctx .send (embed = embed )
474
477
475
478
@config .command ()
479
+ @commands .is_owner ()
476
480
async def get (self , ctx , key = None ):
477
481
"""Shows the config variables that are currently set."""
478
482
keys = self .bot .config .allowed_to_change_in_command
@@ -555,6 +559,7 @@ async def alias(self, ctx):
555
559
return await session .run ()
556
560
557
561
@alias .command (name = 'add' )
562
+ @checks .has_permissions (manage_messages = True )
558
563
async def add_ (self , ctx , name : str .lower , * , value ):
559
564
"""Add an alias to the bot config."""
560
565
if 'aliases' not in self .bot .config .cache :
@@ -590,6 +595,7 @@ async def add_(self, ctx, name: str.lower, *, value):
590
595
return await ctx .send (embed = embed )
591
596
592
597
@alias .command (name = 'del' )
598
+ @checks .has_permissions (manage_messages = True )
593
599
async def del_alias (self , ctx , * , name : str .lower ):
594
600
"""Removes a alias from bot config."""
595
601
0 commit comments