Update flana_tele_bot whitelisted decorator

This commit is contained in:
AlberLC
2023-03-23 06:33:26 +01:00
parent d5b51e3f44
commit 11ef06b1d3

View File

@@ -21,11 +21,11 @@ from flanabot.models import Message
def whitelisted(func: Callable) -> Callable:
@functools.wraps(func)
@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:
return
return await func(self, message)
return await func(self, message, *args, **kwargs)
return wrapper