fix(bible): close asyncio session after unloading the cog
This commit is contained in:
parent
7d1a9cc01a
commit
2859f93501
2 changed files with 15 additions and 32 deletions
|
@ -4,9 +4,7 @@ from redbot.core.utils.chat_formatting import error
|
|||
class BibleAccessError(Exception):
|
||||
def __init__(
|
||||
self,
|
||||
message: str = error(
|
||||
"The provided API key cannot retrieve sections from the configured Bible. Please report this to the bot owner."
|
||||
),
|
||||
message: str = error("The provided API key cannot retrieve sections from the configured Bible. Please report this to the bot owner."),
|
||||
):
|
||||
super().__init__(message)
|
||||
self.message = message
|
||||
|
@ -15,9 +13,7 @@ class BibleAccessError(Exception):
|
|||
class Unauthorized(Exception):
|
||||
def __init__(
|
||||
self,
|
||||
message: str = error(
|
||||
"The API key for API.Bible is missing or invalid. Please report this to the bot owner.\nIf you are the bot owner, please check the documentation [here](<https://seacogs.coastalcommits.com/bible/#setup>)."
|
||||
),
|
||||
message: str = error("The API key for API.Bible is missing or invalid. Please report this to the bot owner.\nIf you are the bot owner, please check the documentation [here](<https://seacogs.coastalcommits.com/bible/#setup>)."),
|
||||
):
|
||||
super().__init__(message)
|
||||
self.message = message
|
||||
|
@ -44,9 +40,7 @@ class ServiceUnavailable(Exception):
|
|||
class InexplicableError(Exception):
|
||||
def __init__(
|
||||
self,
|
||||
message: str = error(
|
||||
"An inexplicable 'Bad Request' error occurred. This error happens occassionally with the API.Bible service. Please try again. If the error persists, please report this to the bot owner."
|
||||
),
|
||||
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."),
|
||||
):
|
||||
super().__init__(message)
|
||||
self.message = message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue