1212from discord .enums import ActivityType
1313from discord .ext import commands
1414
15+ from core import checks
1516from core .changelog import ChangeLog
16- from core .decorators import auth_required , owner_only , trigger_typing
17+ from core .decorators import github_access_token_required , trigger_typing
1718from core .models import Bot
1819from core .paginator import PaginatorSession
1920from core .utils import cleanup_code
@@ -190,8 +191,8 @@ async def about(self, ctx):
190191 await ctx .send (embed = embed )
191192
192193 @commands .command ()
193- @owner_only ()
194- @auth_required
194+ @commands . is_owner ()
195+ @github_access_token_required
195196 @trigger_typing
196197 async def github (self , ctx ):
197198 """Shows the github user your access token is linked to."""
@@ -213,8 +214,8 @@ async def github(self, ctx):
213214 await ctx .send (embed = embed )
214215
215216 @commands .command ()
216- @owner_only ()
217- @auth_required
217+ @commands . is_owner ()
218+ @github_access_token_required
218219 @trigger_typing
219220 async def update (self , ctx ):
220221 """Updates the bot, this only works with heroku users."""
@@ -269,7 +270,7 @@ async def update(self, ctx):
269270 return await ctx .send (embed = embed )
270271
271272 @commands .command (aliases = ['presence' ])
272- @commands .has_permissions (administrator = True )
273+ @checks .has_permissions (administrator = True )
273274 async def activity (self , ctx , activity_type : str , * , message : str = '' ):
274275 """
275276 Set a custom activity for the bot.
@@ -339,7 +340,7 @@ async def activity(self, ctx, activity_type: str, *, message: str = ''):
339340
340341 @commands .command ()
341342 @trigger_typing
342- @commands .has_permissions (administrator = True )
343+ @checks .has_permissions (administrator = True )
343344 async def ping (self , ctx ):
344345 """Pong! Returns your websocket latency."""
345346 embed = Embed (
@@ -350,7 +351,7 @@ async def ping(self, ctx):
350351 return await ctx .send (embed = embed )
351352
352353 @commands .command ()
353- @commands .has_permissions (administrator = True )
354+ @checks .has_permissions (administrator = True )
354355 async def mention (self , ctx , * , mention = None ):
355356 """Changes what the bot mentions at the start of each thread."""
356357 current = self .bot .config .get ('mention' , '@here' )
@@ -374,7 +375,7 @@ async def mention(self, ctx, *, mention=None):
374375 return await ctx .send (embed = embed )
375376
376377 @commands .command ()
377- @commands .has_permissions (administrator = True )
378+ @checks .has_permissions (administrator = True )
378379 async def prefix (self , ctx , * , prefix = None ):
379380 """Changes the prefix for the bot."""
380381
@@ -395,7 +396,7 @@ async def prefix(self, ctx, *, prefix=None):
395396 await ctx .send (embed = embed )
396397
397398 @commands .group ()
398- @owner_only ()
399+ @commands . is_owner ()
399400 async def config (self , ctx ):
400401 """Change config vars for the bot."""
401402
@@ -506,7 +507,7 @@ async def get(self, ctx, key=None):
506507 return await ctx .send (embed = embed )
507508
508509 @commands .group (aliases = ['aliases' ])
509- @commands .has_permissions (manage_messages = True )
510+ @checks .has_permissions (manage_messages = True )
510511 async def alias (self , ctx ):
511512 """Returns a list of aliases that are currently set."""
512513 if ctx .invoked_subcommand is not None :
@@ -606,7 +607,7 @@ async def del_alias(self, ctx, *, name: str.lower):
606607 return await ctx .send (embed = embed )
607608
608609 @commands .command (hidden = True , name = 'eval' )
609- @owner_only ()
610+ @commands . is_owner ()
610611 async def eval_ (self , ctx , * , body ):
611612 """Evaluates Python code"""
612613
0 commit comments