File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ async def get_owners(self) -> typing.List[dico.Snowflake]:
5353 await self .request_current_bot_application_information ()
5454 return self .application .owner_ids if self .application .owner_ids else [self .application .owner .id ]
5555
56+ async def is_owner (self , ctx : Context ):
57+ return ctx .author .id in await self .get_owners ()
58+
5659 async def verify_prefix (self , message : dico .Message ):
5760 # final_prefixes = [(await x(message)) if is_coro(x) else x(message) if inspect.isfunction(x) else x for x in self.prefixes]
5861 final_prefixes = []
Original file line number Diff line number Diff line change @@ -14,3 +14,12 @@ def wrap(maybe_cmd):
1414 maybe_cmd ._checks = [* funcs ]
1515 return maybe_cmd
1616 return wrap
17+
18+
19+ async def __is_owner (ctx : Context ):
20+ return await ctx .bot .is_owner (ctx )
21+
22+
23+ def is_owner ():
24+ return checks (__is_owner )
25+
You can’t perform that action at this time.
0 commit comments