Skip to content

Commit 12f52d2

Browse files
committed
docs: add migrations page.
1 parent 32ed743 commit 12f52d2

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

docs/faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The short answer is: **yes.**
3838

3939
However, the term "work" is loosely structured here. Imagine it like taping a hole in the wall instead of repairing the wall.
4040
We're essentially "plastering" support for discord.py instead of doing the surgery on its internal organs to make it work well
41-
with our library. As it currently stands, **discord-interactions and discord.py** are API wrappers. You will be able to run code
41+
with our library. As it currently stands, **interactions.py and discord.py** are API wrappers. You will be able to run code
4242
*alongside* one another, and you will be able to plug in some classes, but the data conversion **must be exact.**
4343

4444
What does that mean? Well, we'll show you:
@@ -99,7 +99,7 @@ it breaking, hence the "plastering" that is going on here.
9999

100100
Where should we go with discord.py being gone?
101101
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102-
The most *biased* answer would be to, of course, *use discord-interactions.* We already offer a lot of the integral API wrapper
102+
The most *biased* answer would be to, of course, *use interactions.py.* We already offer a lot of the integral API wrapper
103103
aspects as discord.py does, however, we only specialize in interactions. Which means things such as these won't be supported
104104
officially by us (but might be available as 3rd parties):
105105

docs/index.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. image:: _static/banner.png
22

3-
discord-interactions
4-
====================
3+
interactions.py
4+
===============
55
Ever since December 2019, this open-source project has become the culmination of dedication and research towards figuring out the best way to bring **interactions from Discord to you:** we are an easy, simple, scalable and modular library for Discord interactions.
66

77
- Tired of using numerous module dependencies for slash commands and buttons?
@@ -51,6 +51,7 @@ Please look at our pages below to find out where to go.
5151
quickstart.rst
5252
api.rst
5353
faq.rst
54+
migration.rst
5455

5556
How can I contribute?
5657
*********************
@@ -87,7 +88,7 @@ Advanced Search
8788
* :ref:`modindex`
8889
* :ref:`search`
8990

90-
.. _contribution requirements: https://github.com/goverfl0w/discord-interactions/blob/stable/CONTRIBUTING.md
91-
.. _MIT License: https://github.com/goverfl0w/discord-interactions/blob/stable/LICENSE
92-
.. _Pull Requests: https://github.com/goverfl0w/discord-interactions/pulls
93-
.. _Issues: https://github.com/goverfl0w/discord-interactions/issues
91+
.. _contribution requirements: https://github.com/interactions-py/library/blob/stable/CONTRIBUTING.md
92+
.. _MIT License: https://github.com/interactions-py/library/blob/stable/LICENSE
93+
.. _Pull Requests: https://github.com/interactions-py/library/pulls
94+
.. _Issues: https://github.com/interactions-py/library/issues

docs/migration.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Migration
2+
=========
3+
4+
This page aims to serve as a guide towards helping users understand any breaking or otherwise important design choices made
5+
between versions to guide towards easy migration between one another.
6+
7+
4.0.1 → 4.0.2
8+
~~~~~~~~~~~~~~~
9+
10+
The biggest major change between these two versions is the way ``HTTPClient`` and modelled API schema objects are used.
11+
In ``4.0.2``, a new ``_state`` attribute is added in model objects in order to use helper methods. This will not be needed
12+
if you're working with dispatched events from the Gateway, however, manually generating your own model object for use
13+
will need it appended as a key-word argument. The example below shows this change:
14+
15+
.. code-block:: python
16+
17+
# 4.0.1
18+
data = await bot.http.get_channel(789032594456576004)
19+
channel = interactions.Channel(**data)
20+
21+
# 4.0.2
22+
...
23+
channel = interactions.Channel(**data, _state=bot.http)
24+
25+
This change was added in favor for being able to use endpoints in an abstracted state.

0 commit comments

Comments
 (0)