Getting a Response
To get responses (a.k.a. FSM) in RimTUB, Pyromod is used.
You can find the Pyromod documentation here.
Example
from utils import *
from pyromod.exceptions import ListenerTimeout
async def main(app: Client, mod: Module):
cmd = mod.cmd
@cmd("testask")
async def _testask(_, msg: M):
chat_id = "@umemes_bot"
try:
answer = await app.ask(chat_id=chat_id, text="/start", timeout=1)
except ListenerTimeout:
return await msg.edit(f"{chat_id} did not respond!")
await msg.edit("The bot responded:\n" + bq(answer.text.html, False))