Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2448567
feat: `on_start` event (#927)
Toricane Jul 15, 2022
afb0c3b
fix: UnicodeEncodeError when logging events (#926)
Toricane Jul 15, 2022
d27e051
fix: extension context menus (#924)
Toricane Jul 15, 2022
1b4f4d2
docs: update README.rst (#925)
Toricane Jul 15, 2022
afa0382
Fix: fix check in get method (#928)
EepyElvyra Jul 15, 2022
a1feae2
feat: Add converters (#930)
EepyElvyra Jul 16, 2022
0632809
fix: Fix more issues with guild objects when caching a gw event (#929)
EepyElvyra Jul 16, 2022
61f50d3
feat: Remove PresenceButton object. (#935)
FayeDel Jul 16, 2022
77374da
fix: Fix issues with converters (#932)
EepyElvyra Jul 17, 2022
469f2db
fix: get() erroring when requesting anything other than role or emoji…
Wizzerinus Jul 17, 2022
db56b4d
docs: document on_start in more places (#931)
Toricane Jul 17, 2022
3b6edc8
fix: fix string roles format in ``Member.roles`` (#940)
Damego Jul 17, 2022
72a7a98
chore: Update templates for issues and PRs (#934)
EepyElvyra Jul 17, 2022
a8e5034
docs: Switch to Furo. (#938)
FayeDel Jul 17, 2022
97a713d
docs: Fix cache return type, include Spanish language translate suppo…
FayeDel Jul 17, 2022
490adef
docs: Add question tags to type descriptors in docstrings (#936)
Toricane Jul 17, 2022
49f6d23
docs: Completely rebuild translation backend. (#943)
FayeDel Jul 17, 2022
38f4208
fix: fix incorrect ``guild_id`` in modifing cache (#945)
Damego Jul 19, 2022
4bb55e8
fix: fix not fully model convertation to dict (#946)
Damego Jul 19, 2022
5506f8d
fix: Fix item assign error dynamically. (#947)
FayeDel Jul 19, 2022
56df1a8
fix: add missed logic to ``Embed.insert_field_at`` (#951)
Damego Jul 22, 2022
87e938b
feat: Add new json error codes (#954)
Damego Jul 22, 2022
f756fb4
feat: add ``min_length`` & ``max_length`` to ``Option`` (#955)
Damego Jul 22, 2022
bd9c0de
feat: add ``total_message_sent`` to ``Channel`` (#956)
Damego Jul 22, 2022
bb750a5
feat: add ``position`` to ``Message`` (#957)
Damego Jul 22, 2022
10ca65a
feat: Add audit log object (#952)
EepyElvyra Jul 22, 2022
228697e
fix: SyntaxError (#958)
Toricane Jul 22, 2022
19a2eb6
fix: Fix another bug with cache (#944)
EepyElvyra Jul 22, 2022
2929091
feat: on_command_error event (#949)
Toricane Jul 22, 2022
b0001f7
fix: fix ``DictSerializerMixin.update`` sets models into json (#948)
Damego Jul 22, 2022
89e349f
feat!: smarter option decorator (#950)
Toricane Jul 22, 2022
b4aa82c
fix: nested options and choices (#961)
Toricane Jul 23, 2022
236d3b7
chore: include command models for typehinting (#963)
Toricane Jul 23, 2022
4fc3b83
fix: `ActionRow.new()` typehinting (#962)
Toricane Jul 23, 2022
e5a808f
feat: Adding ``communication_disabled_until`` in ``GuildMember`` (#965)
Jul 23, 2022
826b9dd
feat: Suppress voice state console logs. (#967)
FayeDel Jul 24, 2022
e17f35f
fix: Flake8 warnings and errors (#964)
mAxYoLo01 Jul 24, 2022
b8367f2
Update base.py (#960)
EepyElvyra Jul 24, 2022
d1fbb39
Refactor: Allow suppression of non existent events (#968)
athyk Jul 24, 2022
5bdf254
fix: fix some bugs with cache (#970)
Damego Jul 24, 2022
82ee6ce
docs: Fix method reference (#971)
EepyElvyra Jul 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/report-bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ assignees:
- EdVraz
- Astrea49
- Toricane
- Catalyst4222
body:
- type: markdown
id: thanks
attributes:
value: |
Thank you for taking the time to fill out this bug report!
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/request-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ assignees:
- EdVraz
- Astrea49
- Toricane
- Catalyst4222
body:
- type: markdown
id: thanks
attributes:
value: |
Thank you for taking the time to fill out this feature request!
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This pull request is about (X), which does (Y).

- [ ] I've ran `pre-commit` to format and lint the change(s) made.
- [ ] I've checked to make sure the change(s) work on `3.8.6` and higher.
- [ ] This fixes/solves an [Issue](https://github.com/goverfl0w/discord-interactions/issues).
- (If existent):
- [ ] This fixes/solves an [Issue](https://github.com/goverfl0w/discord-interactions/issues) (If existent):.
- resolves #
- I've made this pull request for/as: (check all that apply)
- [ ] Documentation
- [ ] Breaking change
Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Some more unique features that are exclusive to our interactions include:
- **Event-triggered callbacks**: whether a component, application command or interaction response, you'll never need to worry about bridging responses.
- **Dual-way decorator logic**: a decorator can act as both a constructor for an interaction, as well as a callback.
- **API-strict naming**: no more confusion with the naming approach of many libraries; we follow the naming style of interactions from the officially curated Discord Developers documentation.
- **Extensive framework structure**: (**pending in** ``4.1.0``) build your own tools and technologies for our library to develop and integrate community creations.
- **Extensive framework structure**: build your own tools and technologies for our library to develop and integrate community creations.

What do we not offer?
*********************
Expand All @@ -65,11 +65,11 @@ Please read up on our `contribution requirements`_ for the project. This open-so

This open-source project utilizes the following workflows for development:

#. **pre-commit** ``2.16.0``: the architecture uses this before every commit to format and check for severity/QOL-breaking changes.
#. **pre-commit** ``2.20.0``: the architecture uses this before every commit to format and check for severity/QOL-breaking changes.

#. **black** ``21.11b1``
#. **flake8** ``3.9.2``
#. **isort** ``5.9.3``
#. **black** ``22.6.0``
#. **flake8** ``4.0.1``
#. **isort** ``5.10.1``

#. **Sphinx** ``4.1.2``: all of our documentation is powered off of autogenerated documentation of the Sphinx engine.
#. **colorama** ``0.4.4``: our internal logger uses a customized coloring formatter to make looking for specific conditions easier when running tests.
Expand Down
1 change: 0 additions & 1 deletion docs/api.cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Client Cache

.. automodule:: interactions.api.cache
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.dispatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Dispatching

.. automodule:: interactions.api.dispatch
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Enumerable Objects

.. automodule:: interactions.api.enums
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.error.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Error Exceptions

.. automodule:: interactions.api.error
:members:
:noindex:
3 changes: 0 additions & 3 deletions docs/api.gateway.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ Gateway

.. automodule:: interactions.api.gateway
:members:
:noindex:

.. automodule:: interactions.api.gateway.client
:members:
:noindex:

.. automodule:: interactions.api.gateway.heartbeat
:members:
:noindex:
16 changes: 0 additions & 16 deletions docs/api.http.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,64 +5,48 @@ HTTP

.. autoclass:: interactions.api.http.route.Route
:members:
:noindex:

.. autoclass:: interactions.api.http.limiter.Limiter
:members:
:noindex:

.. autoclass:: interactions.api.http.request._Request
:members:
:noindex:

.. autoclass:: interactions.api.http.client.HTTPClient
:members:
:noindex:

.. autoclass:: interactions.api.http.channel.ChannelRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.emoji.EmojiRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.guild.GuildRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.interaction.InteractionRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.member.MemberRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.message.MessageRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.reaction.ReactionRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.scheduledEvent.ScheduledEventRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.sticker.StickerRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.thread.ThreadRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.user.UserRequest
:members:
:noindex:

.. autoclass:: interactions.api.http.webhook.WebhookRequest
:members:
:noindex:
7 changes: 7 additions & 0 deletions docs/api.models.audit_log.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. currentmodule:: interactions

Audit-Log Models
================

.. automodule:: interactions.api.models.audit_log
:members:
1 change: 0 additions & 1 deletion docs/api.models.channel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Channel Models

.. automodule:: interactions.api.models.channel
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.flags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Flag Bitshift Models

.. automodule:: interactions.api.models.flags
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.guild.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Guild Models

.. automodule:: interactions.api.models.guild
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.gw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Gateway-specific Event Models

.. automodule:: interactions.api.models.gw
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.member.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Member Models

.. automodule:: interactions.api.models.member
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.message.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Message Models

.. automodule:: interactions.api.models.message
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Miscellanous Models

.. automodule:: interactions.api.models.misc
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.presence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Presence Models

.. automodule:: interactions.api.models.presence
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.role.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Role Models

.. automodule:: interactions.api.models.role
:members:
:noindex:
1 change: 1 addition & 0 deletions docs/api.models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Model Objects
.. toctree::
:maxdepth: 2

api.models.audit_log.rst
api.models.channel.rst
api.models.guild.rst
api.models.gw.rst
Expand Down
1 change: 0 additions & 1 deletion docs/api.models.team.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Team Models

.. automodule:: interactions.api.models.team
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ User Models

.. automodule:: interactions.api.models.user
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/api.models.webhook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Webhook Models

.. automodule:: interactions.api.models.webhook
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Bot Client

.. automodule:: interactions.client.bot
:members:
:noindex:
11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,18 @@
autosectionlabel_prefix_document = True
hoverxref_auto_ref = True
hoverxref_sphinxtabs = True


# descriptions of the relevant function/method.
autodoc_typehints = "description"

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.autosectionlabel",
"hoverxref.extension",
"karma_sphinx_theme",
"sphinx_search.extension",
"sphinx_copybutton",
"enum_tools.autoenum",
]

# Stackoverflow said that this is gonna cure my LaTeX errors for ref handling.
Expand Down Expand Up @@ -80,7 +85,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "karma_sphinx_theme"
html_theme = "furo"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
1 change: 0 additions & 1 deletion docs/context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ Event Context
.. automodule:: interactions.client.context
:members:
:inherited-members:
:noindex:
1 change: 0 additions & 1 deletion docs/enums.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Enumerable Objects

.. automodule:: interactions.client.enums
:members:
:noindex:
21 changes: 21 additions & 0 deletions docs/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ All events mentioned in this section have the exact naming as they must be put i
There are several different internal events:

- ``raw_socket_create``
- ``on_start``
- ``on_interaction``
- ``on_command``
- ``on_command_error``
- ``on_component``
- ``on_autocomplete``
- ``on_modal``
Expand All @@ -70,6 +72,15 @@ The value of the argument will be the *raw* data sent from Discord, so it is not
as long as you don't absolutely need it.


Event: ``on_start``
^^^^^^^^^^^^^^^^^^^
This event fires only when the bot is started.

This function takes no arguments.

.. attention::
Unlike ``on_ready``, this event will never be dispatched more than once.

Event: ``on_interaction``
^^^^^^^^^^^^^^^^^^^^^^^^^^
This event fires on any interaction (commands, components, autocomplete and modals).
Expand All @@ -90,6 +101,16 @@ Using this event, you will have to manually check everything, from name to wheth
options or anything else - everything will be in the raw context and you will have to search for it


Event: ``on_command_error``
^^^^^^^^^^^^^^^^^^^^^^^^^^^
This event fires when the following conditions are met:

1. There is an error in the command (or subcommand within the command)
2. There is no error callback assigned to that command

The function takes in two arguments, one of the type ``CommandContext``, and the other contains the error.


Event: ``on_component``
^^^^^^^^^^^^^^^^^^^^^^
This event fires on any Component used (for now, those are Buttons and Select Menus).
Expand Down
1 change: 0 additions & 1 deletion docs/ext.base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Core Model

.. automodule:: interactions.ext.base
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/ext.converter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Converter Model

.. automodule:: interactions.ext.converter
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/ext.error.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Error Exceptions

.. automodule:: interactions.ext.error
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/ext.version.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ Versioning Models

.. automodule:: interactions.ext.version
:members:
:noindex:
1 change: 0 additions & 1 deletion docs/get.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ The ``get`` utility method

.. automodule:: interactions.client.get
:members:
:noindex:
12 changes: 5 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ Please read up on our `contribution requirements`_ for the project. This open-so

This open-source project utilizes the following workflows for development:

#. **pre-commit** ``2.16.0``: the architecture uses this before every commit to format and check for severity/QOL-breaking changes.
#. **pre-commit** ``2.20.0``: the architecture uses this before every commit to format and check for severity/QOL-breaking changes.

#. **black** ``21.11b1``
#. **flake8** ``3.9.2``
#. **isort** ``5.9.3``
#. **black** ``22.6.0``
#. **flake8** ``4.0.1``
#. **isort** ``5.10.1``

#. **Sphinx** ``4.1.2``: all of our documentation is powered off of autogenerated documentation of the Sphinx engine.
#. **colorama** ``0.4.4``: our internal logger uses a customized coloring formatter to make looking for specific conditions easier when running tests.
#. **Sphinx** ``4.4.0``: all of our documentation is powered off of autogenerated documentation of the Sphinx engine.
#. **Conventional Commits** ``1.0.0``: every commit that we make to our branches use the official specification of CC 1.0.0 to make git graphs easier when improving and refining communication between code reviews, Pull Requests and commits.

When can I start?
Expand All @@ -87,7 +86,6 @@ Advanced Search

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. _contribution requirements: https://github.com/interactions-py/library/blob/stable/CONTRIBUTING.rst
.. _MIT License: https://github.com/interactions-py/library/blob/stable/LICENSE
Expand Down
Loading