logging of webhook responses
This commit is contained in:
parent
808156f016
commit
e8bfd02259
1 changed files with 2 additions and 1 deletions
3
bot.py
3
bot.py
|
@ -56,12 +56,13 @@ def process_event(event, template):
|
||||||
|
|
||||||
async def send_message(text):
|
async def send_message(text):
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
await session.post(config.WEBHOOK_URL, json={
|
result = await session.post(config.WEBHOOK_URL, json={
|
||||||
"text": text,
|
"text": text,
|
||||||
"format": "html",
|
"format": "html",
|
||||||
"displayName": "PUBLIC INFORMATION STREAMS & SERVICES",
|
"displayName": "PUBLIC INFORMATION STREAMS & SERVICES",
|
||||||
"avatarUrl": config.AVATAR_URL
|
"avatarUrl": config.AVATAR_URL
|
||||||
})
|
})
|
||||||
|
logging.debug(f"RECV: [{result.status}] {await result.text()}")
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
|
|
Loading…
Reference in a new issue