More API refactoring, add HTML text for Telegram, start work on /config

This commit is contained in:
2024-06-26 02:02:55 +02:00
parent 8f1b80ab14
commit 2c73846554
10 changed files with 104 additions and 106 deletions

View File

@ -92,6 +92,7 @@ def cTranslate(context:EventContext, data:InputMessageData) -> None:
except Exception:
raise
# unsplash source appears to be deprecated! <https://old.reddit.com/r/unsplash/comments/s13x4h/what_happened_to_sourceunsplashcom/l65epl8/>
def cUnsplash(context:EventContext, data:InputMessageData) -> None:
try:
Req = HttpReq(f'https://source.unsplash.com/random/?{UrlParse.quote(data.Body)}')
@ -144,7 +145,7 @@ RegisterModule(name="Internet", summary="Tools and toys related to the Internet.
"language_to": True,
"language_from": False,
}),
SafeNamespace(names=["unsplash"], summary="Sends a picture sourced from Unsplash.", handler=cUnsplash),
#SafeNamespace(names=["unsplash"], summary="Sends a picture sourced from Unsplash.", handler=cUnsplash),
SafeNamespace(names=["safebooru"], summary="Sends a picture sourced from Safebooru.", handler=cSafebooru),
])