_GatheringFuture exception was never retrieved

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/chen/trunk@30 32723744-9b23-0b4a-b1da-9b2e968f9461
This commit is contained in:
yakumo.izuru 2024-02-21 20:56:15 +00:00
parent 8932097e37
commit b140875bdf
2 changed files with 14 additions and 4 deletions

BIN
avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 928 KiB

18
main.py
View File

@ -44,6 +44,7 @@ html_files = (
"application/xhtml+xml",
)
class Lifo(list):
"""
Limited size LIFO array to store messages and urls
@ -58,6 +59,7 @@ class Lifo(list):
if len(self) > self.size:
self.pop()
# Cheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeen
class ChenBot(ClientXMPP):
messages = defaultdict(
@ -141,9 +143,12 @@ class ChenBot(ClientXMPP):
async def parse_urls(self, msg, urls, sender, mtype):
body = msg["body"].lower()
if "nsfl" in body: return
if "nsfw" in body: return
if "#nospoil" in body: return
if "nsfl" in body:
return
if "nsfw" in body:
return
if "#nospoil" in body:
return
if "!repo" in body:
msg.reply("https://git.chaotic.ninja/usr/yakumo_izuru/chen\n").send()
for u in urls:
@ -193,7 +198,12 @@ class ChenBot(ClientXMPP):
avatar_bytes = len(avatar)
asyncio.gather(self.plugin["xep_0084"].publish_avatar(avatar))
asyncio.gather(self.plugin["xep_0153"].set_avatar(avatar=avatar, mtype=avatar_type))
asyncio.gather(
self.plugin["xep_0153"].set_avatar(
avatar=avatar,
mtype=avatar_type,
)
)
info = {
"id": avatar_id,
"type": avatar_type,