From cf31e66dd2489b4b391011f2aff710ed9180261e Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 8 Apr 2024 23:01:02 +0200 Subject: [PATCH] use maubot aiohttp handler --- dalle.py | 3 +-- maubot.yaml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dalle.py b/dalle.py index c81e889..bc92fac 100644 --- a/dalle.py +++ b/dalle.py @@ -3,7 +3,6 @@ import urllib import io import base64 import asyncio -import aiohttp import re from PIL import Image @@ -106,7 +105,7 @@ class Dalle(Plugin): "prompt": prompt } - async with aiohttp.request("POST", "https://nexra.aryahcr.cc/api/image/complements", headers=headers, data=json.dumps(data)) as response: + async with self.http.request("POST", "https://nexra.aryahcr.cc/api/image/complements", headers=headers, data=json.dumps(data)) as response: if response.status != 200: self.log.warning(f"Unexpected status sending request to nexra.aryahcr.cc: {response.status_code}") diff --git a/maubot.yaml b/maubot.yaml index 2714834..67fcf97 100644 --- a/maubot.yaml +++ b/maubot.yaml @@ -1,6 +1,6 @@ maubot: 0.1.0 id: sh.boehm.dalle -version: 0.0.03 +version: 0.0.031 license: MIT modules: - dalle