1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 20:43:12 +00:00
Lumi/stubs/reactionmenu/errors.pyi
2024-08-29 07:03:25 -04:00

122 lines
3.3 KiB
Python

"""
This type stub file was generated by pyright.
"""
"""
MIT License
Copyright (c) 2021-present @defxult
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
class MenuException(Exception):
"""Base exception for all menu's"""
...
class ViewMenuException(MenuException):
"""Base :class:`ViewMenu` exception"""
...
class ReactionMenuException(MenuException):
"""Base :class:`ReactionMenu` exception"""
...
class IncorrectType(MenuException):
"""Raised when the expected type was not given"""
def __init__(self, message: str) -> None:
...
class NoButtons(MenuException):
"""Raised when the menu was started but no buttons were registered or the action initiated requires buttons to be registered"""
def __init__(self, message: str = ...) -> None:
...
class InvalidPage(MenuException):
"""Raised when the page selected to remove does not exist"""
...
class DescriptionOversized(MenuException):
"""Used for `TypeEmbedDynamic` menus. The embed description of the menu has a character count > 4096"""
...
class MenuSettingsMismatch(MenuException):
"""Used settings for a specific `menu_type` but different/unrecognized values for those settings were given"""
...
class DuplicateButton(MenuException):
"""The emoji selected as a button has already been registered"""
...
class ImproperStyleFormat(MenuException):
"""The custom style selected by the user did not meet formatting requirements"""
def __init__(self) -> None:
...
class TooManyButtons(MenuException):
"""The amount of buttons registered is > 20 (over discords reaction limit)"""
def __init__(self, message: str = ...) -> None:
...
class MissingSetting(MenuException):
"""Raised when an action requires specific input from the user"""
...
class NoPages(MenuException):
"""Tried to start the menu when they haven't added any pages"""
def __init__(self, message: str = ...) -> None:
...
class MenuAlreadyRunning(MenuException):
"""Called a method that is not allowed to be called after the menu has started"""
def __init__(self, message: str) -> None:
...
class ButtonNotFound(MenuException):
"""Raised when :meth:`.remove_button()` did not find any matching buttons"""
...
class SelectNotFound(MenuException):
"""Raised when :meth:`.remove_select()` did not find any matching selects
.. added:: v3.1.0
"""
...