forked from lorg/ukraine_bus_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtexts.py
34 lines (23 loc) · 814 Bytes
/
texts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# pylint: disable=too-many-lines
from typing import Dict
import utils
from texts_infra import UserInput, Texts, Text, MailTemplate, WebText, WebPages, Param, TemplateLang, AppText
class SpecialInputTexts:
# pylint: disable=R0903
RMRF = "rm -rf"
DROP_TABLE = "drop table"
@utils.registry(UserInput, add_name=True)
class Inputs(Texts[UserInput]):
text_class = UserInput
text_type = 'input'
all_texts: Dict[str, UserInput] = {}
clear = UserInput(
"clear", "Sends a long empty message to clear the screen")
ping = UserInput(
"ping", "Sends a ping message to the bot")
yes = UserInput(
"yes,sure,ok", "when someone sends yes")
class Prompts(Texts[Text]):
text_class = Text
text_type = "prompt"
pong = Text("pong", "response to 'ping'")