Skip to content

Commit d31d994

Browse files
committed
Simplify supported answer and turned off reply to message for text-only answers
1 parent b69ad30 commit d31d994

2 files changed

Lines changed: 10 additions & 47 deletions

File tree

src/main/java/com/github/stickerifier/stickerify/bot/Stickerify.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,8 @@ private void answerText(TelegramRequest request) {
215215
}
216216

217217
private void answerText(Answer answer, TelegramRequest request) {
218-
var answerWithText = new SendRichMessage(request.getChatId(), new InputRichMessage().markdown(answer.getText()))
219-
.replyParameters(new ReplyParameters(request.getMessageId()))
220-
.disableNotification(true);
218+
var message = new InputRichMessage().markdown(answer.getText());
219+
var answerWithText = new SendRichMessage(request.getChatId(), message).disableNotification(true);
221220

222221
try {
223222
execute(answerWithText);

src/main/java/com/github/stickerifier/stickerify/telegram/Answer.java

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ public enum Answer {
1515
- an informative message for any message without a file
1616
- the list of supported files, using the /supported command
1717
18-
Once the file is ready, head to [Stickers](https://t.me/Stickers) to create a new sticker.
18+
Once the file is ready, head to [Stickers bot](https://t.me/Stickers) to create a new sticker.
1919
"""),
2020
FILE_READY("""
2121
Your sticker file is ready\\!
22-
Head to [Stickers](https://t.me/Stickers) to create a new sticker\\.
22+
Head to [Stickers bot](https://t.me/Stickers) to create a new sticker\\.
2323
"""),
2424
FILE_ALREADY_VALID("""
2525
The media you sent was already suitable to be a Telegram sticker.
26-
Send it to [Stickers](https://t.me/Stickers) to add it as a new sticker.
26+
Send it to [Stickers bot](https://t.me/Stickers) to add it as a new sticker.
2727
"""),
2828
FILE_TOO_LARGE("""
2929
The file can't be converted because Telegram bots can't handle files larger than 20 MB at the moment: please send a smaller one.
@@ -47,47 +47,11 @@ public enum Answer {
4747
<tg-thinking>Processing file...</tg-thinking>
4848
"""),
4949
SUPPORTED_FORMATS("""
50-
### Supported formats
51-
52-
<details><summary>Images</summary>
53-
54-
| Format | Support status |
55-
|:------------|:--------------:|
56-
| png | ✔ |
57-
| jpg / jpeg | ✔ |
58-
| static webp | ✔ |
59-
| tiff | ✔ |
60-
| ico | ✔ |
61-
| svg | ✔ |
62-
| psd | ✔ |
63-
64-
</details>
65-
66-
<details><summary>Videos</summary>
67-
68-
| Format | Support status |
69-
|:--------------|:--------------:|
70-
| gif | ✔ |
71-
| mov | ✔ |
72-
| avi | ✔ |
73-
| mp4 | ✔ |
74-
| webm | ✔ |
75-
| m4v | ✔ |
76-
| mkv | ✔ |
77-
| live photos | ✔ |
78-
| animated webp | ✖ |
79-
80-
</details>
81-
82-
<details><summary>Stickers</summary>
83-
84-
| Format | Support status |
85-
|:---------------------------------------------------------------------------|:--------------:|
86-
| static, for instance [MeminiCustom](https://t.me/addstickers/MeminiCustom) | ✔ |
87-
| video, for instance [VideoMemini](https://t.me/addstickers/VideoMemini) | ✔ |
88-
| animated, for instance [HotCherry](https://t.me/addstickers/HotCherry) | ✔ |
89-
90-
</details>
50+
| Type | Supported formats |
51+
|:---------|:------------------------------------------------|
52+
| images | png, jpg, static webp, tiff, ico, svg, psd |
53+
| videos | gif, mov, avi, mp4, webm, m4v, mkv, live photos |
54+
| stickers | static, video, animated |
9155
9256
---
9357

0 commit comments

Comments
 (0)