Compare commits

...

2 commits

Author SHA1 Message Date
d1c0ed2e14
misc(bible): removing some annoying debugging code
Some checks failed
Actions / Lint Code (Pylint) (push) Failing after 16s
Actions / Build Documentation (MkDocs) (push) Successful in 12s
2024-02-02 02:00:54 -05:00
e6b72e80ee
misc(bible): fixing up some fums stuff 2024-02-02 02:00:18 -05:00

View file

@ -71,9 +71,8 @@ class Bible(commands.Cog):
async with self.session.get(url, headers=headers, params=params) as response:
data = await response.json()
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,
json.dumps(data),
)
if response.status == 401:
raise bible.errors.Unauthorized()
@ -85,12 +84,10 @@ class Bible(commands.Cog):
raise bible.errors.ServiceUnavailable()
fums_url = "https://fums.api.bible/f3"
dId = "discord-" + str(self.bot.user.id)
sId = "discord-" + str(ctx.message.created_at.timestamp())
fums_params = {
"t": data["meta"]["fumsToken"],
"dId": dId,
"sId": sId,
"dId": self.bot.user.id,
"sId": ctx.message.created_at.timestamp(),
"uId": ctx.author.id,
}
@ -98,9 +95,9 @@ class Bible(commands.Cog):
self.logger.debug(
"_get_passage FUMS executed with a response code of: %s\nDevice ID: %s\nSession ID: %s\nUser ID: %s",
response.status,
dId,
sId,
ctx.author.id
self.bot.user.id,
ctx.message.created_at.timestamp(),
ctx.author.id,
)
return data["data"]
@ -112,9 +109,8 @@ class Bible(commands.Cog):
async with self.session.get(url, headers=headers) as response:
data = await response.json()
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,
json.dumps(data),
)
if response.status == 401:
raise bible.errors.Unauthorized()
@ -132,9 +128,8 @@ class Bible(commands.Cog):
async with self.session.get(url, headers=headers) as response:
data = await response.json()
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,
json.dumps(data),
)
if response.status == 401:
raise bible.errors.Unauthorized()
@ -152,9 +147,8 @@ class Bible(commands.Cog):
async with self.session.get(url, headers=headers) as response:
data = await response.json()
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,
json.dumps(data),
)
if response.status == 401:
raise bible.errors.Unauthorized()