Compare commits
2 commits
b86707a6b4
...
d1c0ed2e14
Author | SHA1 | Date | |
---|---|---|---|
d1c0ed2e14 | |||
e6b72e80ee |
1 changed files with 9 additions and 15 deletions
|
@ -71,9 +71,8 @@ class Bible(commands.Cog):
|
||||||
async with self.session.get(url, headers=headers, params=params) as response:
|
async with self.session.get(url, headers=headers, params=params) as response:
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
"_get_passage executed with a response code of: %s\n%s",
|
"_get_passage executed with a response code of: %s",
|
||||||
response.status,
|
response.status,
|
||||||
json.dumps(data),
|
|
||||||
)
|
)
|
||||||
if response.status == 401:
|
if response.status == 401:
|
||||||
raise bible.errors.Unauthorized()
|
raise bible.errors.Unauthorized()
|
||||||
|
@ -85,12 +84,10 @@ class Bible(commands.Cog):
|
||||||
raise bible.errors.ServiceUnavailable()
|
raise bible.errors.ServiceUnavailable()
|
||||||
|
|
||||||
fums_url = "https://fums.api.bible/f3"
|
fums_url = "https://fums.api.bible/f3"
|
||||||
dId = "discord-" + str(self.bot.user.id)
|
|
||||||
sId = "discord-" + str(ctx.message.created_at.timestamp())
|
|
||||||
fums_params = {
|
fums_params = {
|
||||||
"t": data["meta"]["fumsToken"],
|
"t": data["meta"]["fumsToken"],
|
||||||
"dId": dId,
|
"dId": self.bot.user.id,
|
||||||
"sId": sId,
|
"sId": ctx.message.created_at.timestamp(),
|
||||||
"uId": ctx.author.id,
|
"uId": ctx.author.id,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,9 +95,9 @@ class Bible(commands.Cog):
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
"_get_passage FUMS executed with a response code of: %s\nDevice ID: %s\nSession ID: %s\nUser ID: %s",
|
"_get_passage FUMS executed with a response code of: %s\nDevice ID: %s\nSession ID: %s\nUser ID: %s",
|
||||||
response.status,
|
response.status,
|
||||||
dId,
|
self.bot.user.id,
|
||||||
sId,
|
ctx.message.created_at.timestamp(),
|
||||||
ctx.author.id
|
ctx.author.id,
|
||||||
)
|
)
|
||||||
return data["data"]
|
return data["data"]
|
||||||
|
|
||||||
|
@ -112,9 +109,8 @@ class Bible(commands.Cog):
|
||||||
async with self.session.get(url, headers=headers) as response:
|
async with self.session.get(url, headers=headers) as response:
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
"_get_books executed with a response code of: %s\n%s",
|
"_get_books executed with a response code of: %s",
|
||||||
response.status,
|
response.status,
|
||||||
json.dumps(data),
|
|
||||||
)
|
)
|
||||||
if response.status == 401:
|
if response.status == 401:
|
||||||
raise bible.errors.Unauthorized()
|
raise bible.errors.Unauthorized()
|
||||||
|
@ -132,9 +128,8 @@ class Bible(commands.Cog):
|
||||||
async with self.session.get(url, headers=headers) as response:
|
async with self.session.get(url, headers=headers) as response:
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
"_get_chapters executed with a response code of: %s\n%s",
|
"_get_chapters executed with a response code of: %s",
|
||||||
response.status,
|
response.status,
|
||||||
json.dumps(data),
|
|
||||||
)
|
)
|
||||||
if response.status == 401:
|
if response.status == 401:
|
||||||
raise bible.errors.Unauthorized()
|
raise bible.errors.Unauthorized()
|
||||||
|
@ -152,9 +147,8 @@ class Bible(commands.Cog):
|
||||||
async with self.session.get(url, headers=headers) as response:
|
async with self.session.get(url, headers=headers) as response:
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
self.logger.debug(
|
self.logger.debug(
|
||||||
"_get_verses executed with a response code of: %s\n%s",
|
"_get_verses executed with a response code of: %s",
|
||||||
response.status,
|
response.status,
|
||||||
json.dumps(data),
|
|
||||||
)
|
)
|
||||||
if response.status == 401:
|
if response.status == 401:
|
||||||
raise bible.errors.Unauthorized()
|
raise bible.errors.Unauthorized()
|
||||||
|
|
Loading…
Add table
Reference in a new issue