From 8d76b9eabc42b7c27f02446cc116e6d80fc661c7 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Fri, 24 Jun 2022 21:43:36 +0200 Subject: [PATCH 01/17] create events.rst --- docs/events.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docs/events.rst diff --git a/docs/events.rst b/docs/events.rst new file mode 100644 index 000000000..d9c7af498 --- /dev/null +++ b/docs/events.rst @@ -0,0 +1,2 @@ +Event Documentation +==================== From c6ba22dfde9deb52458688e4ffe497b8a1888534 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Fri, 24 Jun 2022 21:55:34 +0200 Subject: [PATCH 02/17] docs: stuff --- docs/events.rst | 19 +++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 20 insertions(+) diff --git a/docs/events.rst b/docs/events.rst index d9c7af498..d3876ef4f 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -1,2 +1,21 @@ Event Documentation ==================== + +You all probably already know that there are several events, internal and from discord, that you can receive with your +bot. This page will lead you through all dispatched internal events and a few from discord. All events sent by +discord can be found :ref:`here ` + + +Internal Events +~~~~~~~~~~~~~~~ + + + + + + + +Discord Events +~~~~~~~~~~~~~~ + +TODO: mention voice(!) diff --git a/docs/index.rst b/docs/index.rst index aa5fad487..8de4f62bf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -50,6 +50,7 @@ Please look at our pages below to find out where to go. quickstart.rst api.rst + events.rst faq.rst migration.rst From 031cce27e47563b482af8abbd3d1dd3bbdb36353 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Fri, 24 Jun 2022 21:59:34 +0200 Subject: [PATCH 03/17] docs: stuff --- docs/events.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/events.rst b/docs/events.rst index d3876ef4f..4a387c725 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -9,7 +9,9 @@ discord can be found :ref:`here Date: Sat, 25 Jun 2022 18:04:22 +0200 Subject: [PATCH 04/17] docs: stuff --- docs/events.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/events.rst b/docs/events.rst index 4a387c725..22108ea35 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -9,8 +9,9 @@ discord can be found :ref:`here Date: Sat, 25 Jun 2022 20:35:21 +0200 Subject: [PATCH 05/17] docs: stuff --- docs/events.rst | 54 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index 22108ea35..bd944d2e3 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -2,23 +2,65 @@ Event Documentation ==================== You all probably already know that there are several events, internal and from discord, that you can receive with your -bot. This page will lead you through all dispatched internal events and a few from discord. All events sent by -discord can be found :ref:`here ` +bot. This page will lead you through all dispatched internal events and a few from discord. +How to listen for events +************************ + +Generally, you can listen to an event like this: + +.. code-block:: python + + import interactions + + bot = interactions.Client(...) + + # possibility 1 + + @bot.event + async def on_(...): + ... # do smth + + # possibility 2 + + @bot.event(name="on_") + async def you_are_free_to_name_this_as_you_want(...): + ... # do smth + + bot.start() + + +`` represents the Discord event name - but lowercase and any spaces replaced with `_`. + +`(...)` represents the different arguments a function takes. Those arguments differ per event. + + +Now, lets have a look on different events and how they work, starting with internal events. + Internal Events -~~~~~~~~~~~~~~~ +**************** There are several different internal events: - - `on_ready` + - `on_command` + - `on_component` + - `on_autocomplete` - `on_modal` + - `on_interaction` + - `raw_socket_create` +After this, lets look at events from the Discord API. Discord Events -~~~~~~~~~~~~~~ +*************** + +There is a lot of events dispatched by the Discord API. All of those can be found +:ref:`here `. From b0fc9c26dd4964e21d810cc2262c3a82aef35ae2 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:49:57 +0200 Subject: [PATCH 06/17] docs: stuff --- docs/events.rst | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index bd944d2e3..d7b748a4f 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -17,13 +17,11 @@ Generally, you can listen to an event like this: bot = interactions.Client(...) # possibility 1 - @bot.event async def on_(...): ... # do smth # possibility 2 - @bot.event(name="on_") async def you_are_free_to_name_this_as_you_want(...): ... # do smth @@ -31,9 +29,9 @@ Generally, you can listen to an event like this: bot.start() -`` represents the Discord event name - but lowercase and any spaces replaced with `_`. +```` represents the Discord event name - but lowercase and any spaces replaced with ``_``. -`(...)` represents the different arguments a function takes. Those arguments differ per event. +``(...)`` represents the different arguments a function takes. Those arguments differ per event. Now, lets have a look on different events and how they work, starting with internal events. @@ -43,12 +41,12 @@ Internal Events There are several different internal events: - - `on_command` - - `on_component` - - `on_autocomplete` - - `on_modal` - - `on_interaction` - - `raw_socket_create` + - ``on_command`` + - ``on_component`` + - ``on_autocomplete`` + - ``on_modal`` + - ``on_interaction`` + - ``raw_socket_create`` @@ -59,8 +57,8 @@ Discord Events *************** There is a lot of events dispatched by the Discord API. All of those can be found -:ref:`here `. +The event ``Voice State Update`` can be only received with the voice :ref:``Extension ``. From 394a0d415a71811c89c5d0ade6f9d66ff5719758 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sat, 25 Jun 2022 21:55:19 +0200 Subject: [PATCH 07/17] docs: socket create and on command --- docs/events.rst | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index d7b748a4f..051ad54ba 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -5,6 +5,7 @@ You all probably already know that there are several events, internal and from d bot. This page will lead you through all dispatched internal events and a few from discord. + How to listen for events ************************ @@ -34,6 +35,7 @@ Generally, you can listen to an event like this: ``(...)`` represents the different arguments a function takes. Those arguments differ per event. + Now, lets have a look on different events and how they work, starting with internal events. Internal Events @@ -41,14 +43,38 @@ Internal Events There are several different internal events: + - ``raw_socket_create`` - ``on_command`` - ``on_component`` - ``on_autocomplete`` - ``on_modal`` - ``on_interaction`` - - ``raw_socket_create`` +Event: ``raw_socket_create`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +This event fires on any event sent by Discord, including ``Typing Start`` and ``Voice State Update``. +``Hello``, ``Resumed``, ``Reconnect`` and ``Invalid Session`` still will not be dispatched. + +The function handling the event should take in one argument, the type of this argument is a ``dict``. + +The value of the argument will be the *raw* data sent from discord, so it is not recommended to use that event +as long as you dont absolutely need it. + + +Event: ``on_command`` +^^^^^^^^^^^^^^^^^^^^^ +This event fires on any Application Command (slash command + context menu command) used. + +The function takes in one argument of the type ``CommandContext`` + +Using this event, you will have to manually check everything, from name to whether the used commands has sub commands, +options or anything else - everything will be in the raw context and you will have to search for it + + +Event: ``on_component`` +^^^^^^^^^^^^^^^^^^^^^^ + After this, lets look at events from the Discord API. @@ -59,6 +85,6 @@ Discord Events There is a lot of events dispatched by the Discord API. All of those can be found :ref:``here ``. From 974b35ae966999b8656027fa68abef0c2bacade6 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sat, 25 Jun 2022 21:59:44 +0200 Subject: [PATCH 08/17] docs: socket create and on command --- docs/events.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/events.rst b/docs/events.rst index 051ad54ba..828779c26 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -50,6 +50,7 @@ There are several different internal events: - ``on_modal`` - ``on_interaction`` +Lets now have a look on those events in detail Event: ``raw_socket_create`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 8e1dbe1ec260dcbbb46b063a004a5d04702605c0 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sat, 25 Jun 2022 21:59:54 +0200 Subject: [PATCH 09/17] docs: socket create and on command --- docs/events.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/events.rst b/docs/events.rst index 828779c26..32a00ccc4 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -50,7 +50,7 @@ There are several different internal events: - ``on_modal`` - ``on_interaction`` -Lets now have a look on those events in detail +Lets now have a look on those events in detail: Event: ``raw_socket_create`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From 29bf586faec0d571550519d2a3f586a2ee1704a2 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sun, 26 Jun 2022 15:10:32 +0200 Subject: [PATCH 10/17] docs: socket create and on command --- docs/events.rst | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index 32a00ccc4..b33417d5b 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -44,11 +44,11 @@ Internal Events There are several different internal events: - ``raw_socket_create`` + - ``on_interaction`` - ``on_command`` - ``on_component`` - ``on_autocomplete`` - ``on_modal`` - - ``on_interaction`` Lets now have a look on those events in detail: @@ -63,11 +63,21 @@ The value of the argument will be the *raw* data sent from discord, so it is not as long as you dont absolutely need it. +Event: ``on_interaction`` +^^^^^^^^^^^^^^^^^^^^^^^^^^ +This event fires on any interaction (commands, components, autocomplete and modals). + +The function needs one argument. It will have the type ``CommandContext`` or ``ComponentContext``. + +Because you will have to check for everything, from the ``InteractionType`` to any data inside the context, we do not +recommend using this event unless you have experience with it. + + Event: ``on_command`` ^^^^^^^^^^^^^^^^^^^^^ This event fires on any Application Command (slash command + context menu command) used. -The function takes in one argument of the type ``CommandContext`` +The function takes in one argument of the type ``CommandContext``. Using this event, you will have to manually check everything, from name to whether the used commands has sub commands, options or anything else - everything will be in the raw context and you will have to search for it @@ -75,13 +85,41 @@ options or anything else - everything will be in the raw context and you will ha Event: ``on_component`` ^^^^^^^^^^^^^^^^^^^^^^ +This event fires on any Component used (for now, those are Buttons and Select Menus). + +The function takes in one argument of the type ``ComponentContext``. + +Like ``on_command``, you will have to manually check for everything, i.e for custom id and component type. +Also you will have to look through the argument to find the selected choices, if you have a select menu. + + +Event: ``on_autocomplete`` +^^^^^^^^^^^^^^^^^^^^^^^^^^ +This event fires on any autocomplete triggered. + +The function takes in one argument of the type ``CommandContext``. + +As already in the events above, you will have to get the important values yourself. Those values are here the +autocompleted option and the user input. + + +Event: ``on_modal`` +^^^^^^^^^^^^^^^^^^^ +This event fires on every modal that is submitted. + +The function takes in one argument of the type ``CommandContext``. + +You will have to get all values yourself and check what modal was used when using this event. + +Additionally, if you struggle with getting the values, you can check +:ref:`how it is handled internally `. After this, lets look at events from the Discord API. -Discord Events -*************** +Discord API Events +****************** There is a lot of events dispatched by the Discord API. All of those can be found :ref:``here Date: Sun, 26 Jun 2022 19:15:56 +0200 Subject: [PATCH 11/17] docs: discord event --- docs/events.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/events.rst b/docs/events.rst index b33417d5b..b9a7a3bb4 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -127,3 +127,6 @@ There is a lot of events dispatched by the Discord API. All of those can be foun The events ``Hello``, ``Resumed``, ``Reconnect``, ``Invalid Session`` and ``Typing Start`` are not dispatched by the library. The event ``Voice State Update`` can be only received with the voice :ref:``Extension ``. + + +Lets now have a look at a few events: From 4c20380d79a80a954f6023b4839c0d71e8a4a046 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sun, 26 Jun 2022 21:00:52 +0200 Subject: [PATCH 12/17] refactor: discord events --- docs/events.rst | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index b9a7a3bb4..07b32a1f6 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -32,6 +32,11 @@ Generally, you can listen to an event like this: ```` represents the Discord event name - but lowercase and any spaces replaced with ``_``. +For example: + +* ``READY`` -> ``on_ready`` +* ``GUILD MEMBER ADD`` -> ``on_guild_member_add`` + ``(...)`` represents the different arguments a function takes. Those arguments differ per event. @@ -41,6 +46,8 @@ Now, lets have a look on different events and how they work, starting with inter Internal Events **************** +All events mentioned in this section have the exact naming as they have to be put into the function. + There are several different internal events: - ``raw_socket_create`` @@ -121,12 +128,31 @@ After this, lets look at events from the Discord API. Discord API Events ****************** +Events in this section do not match the name needed to put into the function. Please check +:ref:`above ` for how to get the correct name. + + There is a lot of events dispatched by the Discord API. All of those can be found :ref:``here ` event. You can +also listen for it if you choose to subclass the :ref:`WebSocketClient` -The event ``Voice State Update`` can be only received with the voice :ref:``Extension ``. +The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:``Extension ``. Lets now have a look at a few events: + +Event: ``READY`` +^^^^^^^^^^^^^^^^^^^ +This event fires whenever ``READY`` is dispatched by discord. This happens when connecting to the web socket server. + +This function takes no arguments. + +.. attention:: + Due to the bot reconnecting during runtime ``on_read`` will be dispatched multiple times. If you rely on + ``on_ready`` to do certain things once, check against a global variable as shown below: + + .. code-block:: python From a355ede8442a238196214e82e81a9fba0338a486 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sun, 26 Jun 2022 21:02:39 +0200 Subject: [PATCH 13/17] refactor: discord events --- docs/events.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/events.rst b/docs/events.rst index 07b32a1f6..66c327b6a 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -156,3 +156,13 @@ This function takes no arguments. ``on_ready`` to do certain things once, check against a global variable as shown below: .. code-block:: python + + _ready: bool = False + bot = interactions.Client(...) + + @bot.event + async def on_ready(): + global _ready + if not _ready: + ... # do stuff + _ready = True From c08f187ad46c3515b8ef69c5fca5cd4b1a3964e7 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sun, 26 Jun 2022 21:08:58 +0200 Subject: [PATCH 14/17] fix: attempt to fix links --- docs/events.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index 66c327b6a..831c09dc2 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -133,14 +133,14 @@ Events in this section do not match the name needed to put into the function. Pl There is a lot of events dispatched by the Discord API. All of those can be found -:ref:``here ` event. You can +``TYPING START`` will be included into the :ref:`raw socket create` event. You can also listen for it if you choose to subclass the :ref:`WebSocketClient` -The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:``Extension ``. +The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:`Extension `. Lets now have a look at a few events: From 61a1c885ef4f3899c71a354d5fe5aebe63a5ee58 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Sun, 26 Jun 2022 22:01:00 +0200 Subject: [PATCH 15/17] docs: stuff --- docs/events.rst | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index 831c09dc2..e68f6e29e 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -132,13 +132,12 @@ Events in this section do not match the name needed to put into the function. Pl :ref:`above ` for how to get the correct name. -There is a lot of events dispatched by the Discord API. All of those can be found -:ref:`here ` event. You can -also listen for it if you choose to subclass the :ref:`WebSocketClient` +``TYPING START`` will be included into the :raw socket create event. You can +also listen for it if you choose to subclass the WebSocketClient The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:`Extension `. @@ -146,13 +145,13 @@ The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:`Exten Lets now have a look at a few events: Event: ``READY`` -^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^ This event fires whenever ``READY`` is dispatched by discord. This happens when connecting to the web socket server. This function takes no arguments. .. attention:: - Due to the bot reconnecting during runtime ``on_read`` will be dispatched multiple times. If you rely on + Due to the bot reconnecting during runtime, ``on_ready`` will be dispatched multiple times. If you rely on ``on_ready`` to do certain things once, check against a global variable as shown below: .. code-block:: python @@ -166,3 +165,16 @@ This function takes no arguments. if not _ready: ... # do stuff _ready = True + + +Events: ``GUILD MEMBER UPDATE`` and ``GUILD MEMBER ADD`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +These events fire whenever a member joins a guild or a member of a guild gets modified. + +The function takes in one argument of the type ``GuildMember``. + +The argument has the exact same methods as a normal ``Member`` object, except the methods *do not take in a guild id*. +Please keep that in mind when using this event. + + +.. _here: https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events From a3e643ad116cf2185cc9c21eee6231bf602b9264 Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:52:17 +0200 Subject: [PATCH 16/17] Update events.rst --- docs/events.rst | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/events.rst b/docs/events.rst index e68f6e29e..3dbe103e4 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -1,8 +1,8 @@ Event Documentation ==================== -You all probably already know that there are several events, internal and from discord, that you can receive with your -bot. This page will lead you through all dispatched internal events and a few from discord. +You all probably already know that there are several events, internal and from Discord, that you can receive with your +bot. This page will lead you through all dispatched internal events and a few from Discord. @@ -19,18 +19,18 @@ Generally, you can listen to an event like this: # possibility 1 @bot.event - async def on_(...): + async def on_(...): ... # do smth # possibility 2 - @bot.event(name="on_") + @bot.event(name="on_") async def you_are_free_to_name_this_as_you_want(...): ... # do smth bot.start() -```` represents the Discord event name - but lowercase and any spaces replaced with ``_``. +```` represents the Discord event name - but lowercase and any spaces replaced with ``_``. For example: @@ -41,12 +41,12 @@ For example: -Now, lets have a look on different events and how they work, starting with internal events. +Now, let us have a look at different events and how they work, starting with internal events. Internal Events **************** -All events mentioned in this section have the exact naming as they have to be put into the function. +All events mentioned in this section have the exact naming as they must be put into the function. There are several different internal events: @@ -57,7 +57,7 @@ There are several different internal events: - ``on_autocomplete`` - ``on_modal`` -Lets now have a look on those events in detail: +Lets now have a look at those events in detail: Event: ``raw_socket_create`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -66,8 +66,8 @@ This event fires on any event sent by Discord, including ``Typing Start`` and ` The function handling the event should take in one argument, the type of this argument is a ``dict``. -The value of the argument will be the *raw* data sent from discord, so it is not recommended to use that event -as long as you dont absolutely need it. +The value of the argument will be the *raw* data sent from Discord, so it is not recommended to use that event +as long as you don't absolutely need it. Event: ``on_interaction`` @@ -86,7 +86,7 @@ This event fires on any Application Command (slash command + context menu comman The function takes in one argument of the type ``CommandContext``. -Using this event, you will have to manually check everything, from name to whether the used commands has sub commands, +Using this event, you will have to manually check everything, from name to whether the used commands have sub commands, options or anything else - everything will be in the raw context and you will have to search for it @@ -97,7 +97,7 @@ This event fires on any Component used (for now, those are Buttons and Select Me The function takes in one argument of the type ``ComponentContext``. Like ``on_command``, you will have to manually check for everything, i.e for custom id and component type. -Also you will have to look through the argument to find the selected choices, if you have a select menu. +Also, you will have to look through the argument to find the selected choices, if you have a select menu. Event: ``on_autocomplete`` @@ -120,33 +120,33 @@ You will have to get all values yourself and check what modal was used when usin Additionally, if you struggle with getting the values, you can check -:ref:`how it is handled internally `. +:ref:`how it is handled internally `. -After this, lets look at events from the Discord API. +After this, let us look at events from the Discord API. Discord API Events ****************** Events in this section do not match the name needed to put into the function. Please check -:ref:`above ` for how to get the correct name. +:ref:`above ` for how to get the correct name. -There is a lot of events dispatched by the Discord API. All of those can be found `here`_. +There are a lot of events dispatched by the Discord API. All of those can be found `here`_. The events ``HELLO``, ``RESUMED``, ``RECONNECT``, ``INVALID SESSION`` and ``TYPING START`` are not dispatched by the library. -``TYPING START`` will be included into the :raw socket create event. You can +``TYPING START`` will be included in the raw socket create event. You can also listen for it if you choose to subclass the WebSocketClient -The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:`Extension `. +The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:`Extension `. Lets now have a look at a few events: Event: ``READY`` ^^^^^^^^^^^^^^^^ -This event fires whenever ``READY`` is dispatched by discord. This happens when connecting to the web socket server. +This event fires whenever ``READY`` is dispatched by Discord. This happens when connecting to the web socket server. This function takes no arguments. @@ -173,8 +173,8 @@ These events fire whenever a member joins a guild or a member of a guild gets mo The function takes in one argument of the type ``GuildMember``. -The argument has the exact same methods as a normal ``Member`` object, except the methods *do not take in a guild id*. +The argument has the same methods as a normal ``Member`` object, except the methods *do not take in a guild id*. Please keep that in mind when using this event. -.. _here: https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events +.. _here: https://Discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events From c0070d4ab52c0917ddc3126d6a7d74267aac983d Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Thu, 30 Jun 2022 12:52:39 +0200 Subject: [PATCH 17/17] Update docs/events.rst Co-authored-by: Toricane <73972068+Toricane@users.noreply.github.com> --- docs/events.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/events.rst b/docs/events.rst index 3dbe103e4..54baf788b 100644 --- a/docs/events.rst +++ b/docs/events.rst @@ -142,7 +142,7 @@ also listen for it if you choose to subclass the WebSocketClient The event ``VOICE STATE UPDATE`` can be only received with the voice :ref:`Extension `. -Lets now have a look at a few events: +Let's now have a look at a few events: Event: ``READY`` ^^^^^^^^^^^^^^^^