Update flana_tele_bot whitelisted decorator
This commit is contained in:
@@ -21,11 +21,11 @@ from flanabot.models import Message
|
|||||||
def whitelisted(func: Callable) -> Callable:
|
def whitelisted(func: Callable) -> Callable:
|
||||||
@functools.wraps(func)
|
@functools.wraps(func)
|
||||||
@find_message
|
@find_message
|
||||||
async def wrapper(self: FlanaTeleBot, message: Message):
|
async def wrapper(self: FlanaTeleBot, message: Message, *args, **kwargs):
|
||||||
if message.author.id not in self.whitelist_ids:
|
if message.author.id not in self.whitelist_ids:
|
||||||
return
|
return
|
||||||
|
|
||||||
return await func(self, message)
|
return await func(self, message, *args, **kwargs)
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user