From 10300ce307e7760ae63272785b21c49370a47de9 Mon Sep 17 00:00:00 2001 From: Arthurdw Date: Thu, 14 Oct 2021 11:26:49 +0200 Subject: [PATCH] :memo: Docs update + removed debug log --- pincer/commands.py | 1 - pincer/middleware/message_create.py | 1 - pincer/middleware/message_update.py | 11 +++++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pincer/commands.py b/pincer/commands.py index 554fad07..8414fb53 100644 --- a/pincer/commands.py +++ b/pincer/commands.py @@ -460,7 +460,6 @@ async def __add_commands(self): to Discord! """ to_add = ChatCommandHandler.register - print(to_add.keys(), list(map(lambda x: x.name, self._api_commands))) for reg_cmd in self._api_commands: try: diff --git a/pincer/middleware/message_create.py b/pincer/middleware/message_create.py index a93780ea..bc94cfd5 100644 --- a/pincer/middleware/message_create.py +++ b/pincer/middleware/message_create.py @@ -17,7 +17,6 @@ async def message_create_middleware(self, payload: GatewayDispatch): :param payload: The data received from the message creation event. - """ return "on_message", [ UserMessage.from_dict( diff --git a/pincer/middleware/message_update.py b/pincer/middleware/message_update.py index abcac9a4..d47a7e56 100644 --- a/pincer/middleware/message_update.py +++ b/pincer/middleware/message_update.py @@ -8,6 +8,17 @@ async def message_update_middleware(self, payload: GatewayDispatch): + """ + Middleware for ``on_message_update`` event, + generate a class for the message that has been updated. + + :param self: + The current client. + + :param payload: + The data received from the message update event. + + """ return "on_message_update", [ UserMessage.from_dict( {"_client": self, "_http": self.http, **payload.data}