Fix some decorators not working when used in plugins

This commit is contained in:
Dan 2018-11-10 15:15:58 +01:00
parent c3edd9d862
commit fafa3b5131
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ from ...ext import BaseClient
class OnCallbackQuery(BaseClient):
def on_callback_query(self, filters=None, group: int = 0):
def on_callback_query(self=None, filters=None, group: int = 0):
"""Use this decorator to automatically register a function for handling
callback queries. This does the same thing as :meth:`add_handler` using the
:class:`CallbackQueryHandler`.

View File

@ -22,7 +22,7 @@ from ...ext import BaseClient
class OnDeletedMessages(BaseClient):
def on_deleted_messages(self, filters=None, group: int = 0):
def on_deleted_messages(self=None, filters=None, group: int = 0):
"""Use this decorator to automatically register a function for handling
deleted messages. This does the same thing as :meth:`add_handler` using the
:class:`DeletedMessagesHandler`.

View File

@ -21,7 +21,7 @@ from ...ext import BaseClient
class OnDisconnect(BaseClient):
def on_disconnect(self):
def on_disconnect(self=None):
"""Use this decorator to automatically register a function for handling
disconnections. This does the same thing as :meth:`add_handler` using the
:class:`DisconnectHandler`.