feat: add SST
This commit is contained in:
1 parent
51093da660
commit
bfd16ab02c
11 files changed
+196
-4
No files matched your search
@@ -1,3 +1,3 @@
|
||||
from userbot.modules.jobs.handlers import backfill, fetch_media
|
||||
from userbot.modules.jobs.handlers import backfill, fetch_media, transcribe
|
||||
|
||||
__all__ = ["backfill", "fetch_media"]
|
||||
__all__ = ["backfill", "fetch_media", "transcribe"]
|
||||
@@ -0,0 +1,16 @@
|
||||
from userbot.modules.jobs.context import JobContext
|
||||
from userbot.modules.jobs.registry import register
|
||||
from userbot.modules.stt import transcribe_message
|
||||
|
||||
|
||||
@register("transcribe")
|
||||
async def transcribe(ctx: JobContext) -> None:
|
||||
client = ctx.client
|
||||
if client is None:
|
||||
return
|
||||
capture = getattr(client, "capture", None)
|
||||
if capture is None:
|
||||
return
|
||||
chat_id = ctx.job.params["chat_id"]
|
||||
message_id = ctx.job.params["message_id"]
|
||||
await transcribe_message(client, capture, chat_id, message_id)
|
||||
Reference in new issue
Block a user