debug
This commit is contained in:
parent
bc25ae71b3
commit
81e4337380
|
|
@ -111,7 +111,8 @@ class IdaCogs(commands.Cog):
|
||||||
print(f"[{datetime.isoformat(datetime.now())}]{author} delivery of {quantity} of {commodity} to a {target}")
|
print(f"[{datetime.isoformat(datetime.now())}]{author} delivery of {quantity} of {commodity} to a {target}")
|
||||||
await helpers.writeDeliveryToCommandFile(author, data)
|
await helpers.writeDeliveryToCommandFile(author, data)
|
||||||
else:
|
else:
|
||||||
await ctx.followup.send(f"Failed to log delivery (HTTP {response}). Please contact the yellow people if that keeps happening")
|
await ctx.followup.send(f"Google returned an error. (HTTP {response}). But your delivery may have gone through. Maybe. Maybe not? who knows? Not fucking Google apparently. ")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await ctx.followup.send(f"Something broke. Why do you keep breaking the bot, uh? :(")
|
await ctx.followup.send(f"Something broke. Why do you keep breaking the bot, uh? :(")
|
||||||
channel = self.bot.get_channel(self.debugChannel)
|
channel = self.bot.get_channel(self.debugChannel)
|
||||||
|
|
@ -296,7 +297,7 @@ class IdaCogs(commands.Cog):
|
||||||
|
|
||||||
response = await helpers.getFromSheet(self.session, self.gsheetToken, "commodity")
|
response = await helpers.getFromSheet(self.session, self.gsheetToken, "commodity")
|
||||||
|
|
||||||
print(response)
|
#print(response)
|
||||||
commodity, values, initial = response.split("|")
|
commodity, values, initial = response.split("|")
|
||||||
|
|
||||||
commodity = commodity.split(",")
|
commodity = commodity.split(",")
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ async def getFromSheet(session, gsheetToken, data):
|
||||||
async def postToSheet(session, data, gsheetToken):
|
async def postToSheet(session, data, gsheetToken):
|
||||||
async with session.post(gsheetToken, json=data) as response:
|
async with session.post(gsheetToken, json=data) as response:
|
||||||
text = await response.text()
|
text = await response.text()
|
||||||
#print(text)
|
print(text)
|
||||||
|
print(response)
|
||||||
#print("Status:", response.status)
|
#print("Status:", response.status)
|
||||||
return response.status
|
return response.status
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user