Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
Merge branch 'rewrite' of https://github.com/RealistikDash/GDPyS into…
Browse files Browse the repository at this point in the history
… rewrite
  • Loading branch information
RealistikDash committed Oct 6, 2020
2 parents 2cdece0 + e542338 commit 7549eab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gdpys/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ async def get_daily_level(self) -> DailyLevel:
# Commands #
############################

def command(self, name: str=None, permission: Permissions=None):
def command(self, _name: str=None, _permission: Permissions=None):
"""Decorator to create commands"""
global name
global permission

name = _name
permission = _permission
def decorator(coro):
if not coro.__code__.co_flags & 0x0080 or getattr(coro, '_is_coroutine', False):
raise Exception("Function is not a coroutine function!")
Expand Down

0 comments on commit 7549eab

Please sign in to comment.