From b225176f515fc96362ca3bcec95e45e01b7bc555 Mon Sep 17 00:00:00 2001 From: Nerd Bear Date: Mon, 28 Oct 2024 00:31:23 +0000 Subject: [PATCH 1/7] Added parameter info to disnake.ext.commands.Bot.run() Signed-off-by: Nerd Bear --- disnake/client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/disnake/client.py b/disnake/client.py index 80b3d67c65..c19217b024 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -901,7 +901,7 @@ async def on_message(message): @client.listen('on_message') async def my_message(message): print('two') - + # in yet another file @client.listen(Event.message) async def another_message(message): @@ -1258,6 +1258,11 @@ def run(self, *args: Any, **kwargs: Any) -> None: function should not be used. Use :meth:`start` coroutine or :meth:`connect` + :meth:`login`. + Parameters + ---------- + token: `str` + The discord token of the bot that is being ran. + Roughly Equivalent to: :: try: From 49aabc09fb0e9659d2f86291ea618bd5a8230ed2 Mon Sep 17 00:00:00 2001 From: Nerd Bear Date: Fri, 1 Nov 2024 15:55:02 +0000 Subject: [PATCH 2/7] Update client.py Signed-off-by: Nerd Bear --- disnake/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disnake/client.py b/disnake/client.py index c19217b024..e4fa0e35a9 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -901,7 +901,7 @@ async def on_message(message): @client.listen('on_message') async def my_message(message): print('two') - + # in yet another file @client.listen(Event.message) async def another_message(message): From 23416f5749c050bf65c54641b6091b391ff2209e Mon Sep 17 00:00:00 2001 From: Nerd Bear Date: Thu, 14 Nov 2024 20:50:54 +0000 Subject: [PATCH 3/7] Update disnake/client.py Co-authored-by: shiftinv <8530778+shiftinv@users.noreply.github.com> Signed-off-by: Nerd Bear --- disnake/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disnake/client.py b/disnake/client.py index e4fa0e35a9..625043f5c6 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -1260,7 +1260,7 @@ def run(self, *args: Any, **kwargs: Any) -> None: Parameters ---------- - token: `str` + token: :class:`str` The discord token of the bot that is being ran. Roughly Equivalent to: :: From 87d1c8599110e391b4bf1673f92af1289847d856 Mon Sep 17 00:00:00 2001 From: Nerd Bear Date: Thu, 14 Nov 2024 20:58:23 +0000 Subject: [PATCH 4/7] Moved Params docstring bellow warnings and Roughly equivalent to Signed-off-by: Nerd Bear --- disnake/client.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/disnake/client.py b/disnake/client.py index 625043f5c6..df6985c0d8 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -1257,11 +1257,6 @@ def run(self, *args: Any, **kwargs: Any) -> None: If you want more control over the event loop then this function should not be used. Use :meth:`start` coroutine or :meth:`connect` + :meth:`login`. - - Parameters - ---------- - token: :class:`str` - The discord token of the bot that is being ran. Roughly Equivalent to: :: @@ -1277,7 +1272,12 @@ def run(self, *args: Any, **kwargs: Any) -> None: This function must be the last function to call due to the fact that it is blocking. That means that registration of events or anything being - called after this function call will not execute until it returns. + called after this function call will not execute until it returns + + Parameters + ---------- + token: :class:`str` + The discord token of the bot that is being ran. """ loop = self.loop From 65978e4d5aa93334597471904c9b5c17820de4c1 Mon Sep 17 00:00:00 2001 From: Nerd Bear Date: Thu, 14 Nov 2024 22:31:45 +0000 Subject: [PATCH 5/7] General lint --- disnake/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disnake/client.py b/disnake/client.py index df6985c0d8..93ef8f8713 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -11,7 +11,7 @@ import warnings from datetime import datetime, timedelta from errno import ECONNRESET -from typing import ( +from typing import ( TYPE_CHECKING, Any, Callable, From d17f8cbc27d352f8d1c770ce09f5055c9276b6f3 Mon Sep 17 00:00:00 2001 From: Nerd Bear Date: Thu, 14 Nov 2024 22:49:30 +0000 Subject: [PATCH 6/7] commit for tests to run --- disnake/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disnake/client.py b/disnake/client.py index 93ef8f8713..df6985c0d8 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -11,7 +11,7 @@ import warnings from datetime import datetime, timedelta from errno import ECONNRESET -from typing import ( +from typing import ( TYPE_CHECKING, Any, Callable, From db33e44bbf3d91f421015d6551e82006193675df Mon Sep 17 00:00:00 2001 From: Nerd Bear Date: Thu, 14 Nov 2024 22:58:23 +0000 Subject: [PATCH 7/7] Re run of pre commit --- disnake/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disnake/client.py b/disnake/client.py index df6985c0d8..2c4e2c7da4 100644 --- a/disnake/client.py +++ b/disnake/client.py @@ -1257,7 +1257,7 @@ def run(self, *args: Any, **kwargs: Any) -> None: If you want more control over the event loop then this function should not be used. Use :meth:`start` coroutine or :meth:`connect` + :meth:`login`. - + Roughly Equivalent to: :: try: