Skip to content

Commit bc29422

Browse files
committed
Update migrate_to_109.rst
1 parent 5cb9c54 commit bc29422

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

docs/migrate_to_109.rst

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,25 @@ After:
6262
...
6363
6464
65+
Auto-registering
66+
****************
67+
68+
We've changed the method of automatically registering commands to API to reduce the request amount
69+
and prevent rate limit. So, `auto_register` and `auto_delete` parameter is now removed. Please change your SlashContext
70+
params like this.
71+
72+
Before:
73+
74+
.. code-block:: python
75+
76+
slash = SlashContext(..., auto_register=True, auto_delete=True)
77+
78+
After:
79+
80+
.. code-block:: python
81+
82+
slash = SlashContext(..., sync_commands=True)
83+
6584
Cog Support
6685
***********
6786

@@ -74,6 +93,8 @@ Before:
7493
if not hasattr(bot, "slash"):
7594
# Creates new SlashCommand instance to bot if bot doesn't have.
7695
bot.slash = SlashCommand(bot, override_type=True)
96+
# Note that hasattr block is optional, meaning you might not have it.
97+
# Its completely fine, and ignore it.
7798
self.bot = bot
7899
self.bot.slash.get_cog_commands(self)
79100
@@ -92,7 +113,7 @@ After:
92113
93114
...
94115
95-
As you can seem `if not hasattr(...):` block is removed, moving to main file like this is necessary.
116+
As you can see `if not hasattr(...):` block is removed, moving to main file like this is necessary.
96117

97118
.. code-block:: python
98119
@@ -105,3 +126,15 @@ Auto-convert
105126
------------
106127

107128
It got deleted, so please remove all of it if you used it.
129+
130+
Also, we've added `connector` parameter, which is for helping passing options as kwargs
131+
if your command option is other that english.
132+
133+
Usage:
134+
135+
.. code-block:: python
136+
137+
{
138+
"example-arg": "example_arg",
139+
"시간": "hour"
140+
}

0 commit comments

Comments
 (0)