-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Labels
breakingThis contains breaking changesThis contains breaking changesbugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededpriorityThis Issue/PR must be resolved first before accepting any othersThis Issue/PR must be resolved first before accepting any others
Description
Describe the bug.
in LibraryException this is the __init__:
def __init__(self, message: str = None, code: int = 0, severity: int = 0, **kwargs):however, the library uses errors like:
raise LibraryException(11, message="Your command must have a name.")which when tried in a terminal results in
>>> raise LibraryException(11, message="Your command must have a name.")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got multiple values for argument 'message'so the __init__ should instead be
def __init__(self, code: int = 0, message: str = None, severity: int = 0, **kwargs):List the steps.
>>> from interactions import LibraryException
>>> raise LibraryException(11, message="Your command must have a name.")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got multiple values for argument 'message'What you expected.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
interactions.api.error.LibraryException: An error occurred:
Your command must have a name., with code '11' and severity '0'What you saw.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got multiple values for argument 'message'What version of the library did you use?
unstable
Version specification
No response
Code of Conduct
- I agree to follow the contribution requirements.
Metadata
Metadata
Assignees
Labels
breakingThis contains breaking changesThis contains breaking changesbugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is neededpriorityThis Issue/PR must be resolved first before accepting any othersThis Issue/PR must be resolved first before accepting any others