use maubot aiohttp handler

This commit is contained in:
Philipp 2024-04-08 23:01:02 +02:00
parent 5473df0e5d
commit cf31e66dd2
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750
2 changed files with 2 additions and 3 deletions

View file

@ -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}")

View file

@ -1,6 +1,6 @@
maubot: 0.1.0
id: sh.boehm.dalle
version: 0.0.03
version: 0.0.031
license: MIT
modules:
- dalle