mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-12-03 14:02:19 +00:00
Remove discord.InvalidArgument
This uses TypeError and ValueError instead.
This commit is contained in:
@@ -1124,6 +1124,10 @@ class Client:
|
||||
.. versionchanged:: 2.0
|
||||
Removed the ``afk`` keyword-only parameter.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
This function no-longer raises ``InvalidArgument`` instead raising
|
||||
:exc:`TypeError`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
activity: Optional[:class:`.BaseActivity`]
|
||||
@@ -1134,7 +1138,7 @@ class Client:
|
||||
|
||||
Raises
|
||||
------
|
||||
InvalidArgument
|
||||
TypeError
|
||||
If the ``activity`` parameter is not the proper type.
|
||||
"""
|
||||
|
||||
@@ -1355,10 +1359,16 @@ class Client:
|
||||
Bot accounts in more than 10 guilds are not allowed to create guilds.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
``name`` and ``icon`` parameters are now keyword-only.
|
||||
The `region`` parameter has been removed.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
``name`` and ``region``, and ``icon`` parameters are now keyword-only.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
This function no-longer raises ``InvalidArgument`` instead raising
|
||||
:exc:`ValueError`.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
name: :class:`str`
|
||||
@@ -1375,7 +1385,7 @@ class Client:
|
||||
------
|
||||
HTTPException
|
||||
Guild creation failed.
|
||||
InvalidArgument
|
||||
ValueError
|
||||
Invalid icon image format given. Must be PNG or JPG.
|
||||
|
||||
Returns
|
||||
|
||||
Reference in New Issue
Block a user