2024-02-01 19:46:39 -05:00
from redbot . core . utils . chat_formatting import error
2024-02-01 19:10:05 -05:00
class BibleAccessError ( Exception ) :
2024-02-01 19:46:39 -05:00
def __init__ (
self ,
2025-01-26 00:39:09 +00:00
message : str = error ( " The provided API key cannot retrieve sections from the configured Bible. Please report this to the bot owner. " ) ,
2024-02-01 19:46:39 -05:00
) :
super ( ) . __init__ ( message )
self . message = message
2024-02-01 19:10:05 -05:00
2025-01-26 01:53:09 +00:00
class UnauthorizedError ( Exception ) :
2024-02-01 19:46:39 -05:00
def __init__ (
self ,
2025-01-26 00:39:09 +00:00
message : str = error ( " The API key for API.Bible is missing or invalid. Please report this to the bot owner. \n If you are the bot owner, please check the documentation [here](<https://seacogs.coastalcommits.com/bible/#setup>). " ) ,
2024-02-01 19:46:39 -05:00
) :
super ( ) . __init__ ( message )
self . message = message
2024-02-01 19:25:02 -05:00
2025-01-26 01:53:09 +00:00
class NotFoundError ( Exception ) :
2024-02-01 19:46:39 -05:00
def __init__ (
self ,
message : str = error ( " The requested passage was not found. " ) ,
) :
super ( ) . __init__ ( message )
self . message = message
2024-02-02 00:05:36 -05:00
2025-01-26 01:53:09 +00:00
class ServiceUnavailableError ( Exception ) :
2024-02-02 00:05:36 -05:00
def __init__ (
self ,
message : str = error ( " The API.Bible service is currently unavailable. " ) ,
) :
super ( ) . __init__ ( message )
self . message = message
2024-02-02 02:10:06 -05:00
class InexplicableError ( Exception ) :
def __init__ (
self ,
2025-01-26 00:39:09 +00:00
message : str = error ( " An inexplicable ' Bad Request ' error occurred. This error happens occasionally with the API.Bible service. Please try again. If the error persists, please report this to the bot owner. " ) ,
2024-02-02 02:10:06 -05:00
) :
super ( ) . __init__ ( message )
self . message = message