@@ -23,7 +23,7 @@ import dev.inmo.tgbotapi.bot.RequestsExecutor
23
23
import dev.inmo.tgbotapi.extensions.api.chat.modify.pinChatMessage
24
24
import dev.inmo.tgbotapi.extensions.api.send.payments.sendInvoice
25
25
import dev.inmo.tgbotapi.extensions.api.send.reply
26
- import dev.inmo.tgbotapi.types.ParseMode.MarkdownV2
26
+ import dev.inmo.tgbotapi.types.message.MarkdownV2ParseMode
27
27
import dev.inmo.tgbotapi.types.payments.LabeledPrice
28
28
import dev.inmo.tgbotapi.types.update.abstracts.Update
29
29
import dev.inmo.tgbotapi.utils.PreviewFeature
@@ -56,39 +56,39 @@ class PinCommandUpdateProcessor(
56
56
val duration = pin.duration
57
57
58
58
if (pin.message == null ) {
59
- bot.reply(to = pin.request, text = help(pins), parseMode = MarkdownV2 )
59
+ bot.reply(to = pin.request, text = help(pins), parseMode = MarkdownV2ParseMode )
60
60
pinsShop(pin)
61
61
62
62
return
63
63
}
64
64
65
65
if (duration !is PinDuration .Recognized ) {
66
- bot.reply(to = pin.request, text = unrecognizedDuration(), parseMode = MarkdownV2 )
66
+ bot.reply(to = pin.request, text = unrecognizedDuration(), parseMode = MarkdownV2ParseMode )
67
67
68
68
return
69
69
}
70
70
71
71
if (duration.duration.isNegative || duration.duration.isZero) {
72
- bot.reply(to = pin.request, text = negativeDuration(), parseMode = MarkdownV2 )
72
+ bot.reply(to = pin.request, text = negativeDuration(), parseMode = MarkdownV2ParseMode )
73
73
74
74
return
75
75
}
76
76
77
77
if (duration.duration > Duration .ofDays(90 )) {
78
- bot.reply(to = pin.request, text = tooPositiveDuration(), parseMode = MarkdownV2 )
78
+ bot.reply(to = pin.request, text = tooPositiveDuration(), parseMode = MarkdownV2ParseMode )
79
79
80
80
return
81
81
}
82
82
83
83
if (pins < pin.price) {
84
- bot.reply(to = pin.request, text = beggar(pins, pin.price), parseMode = MarkdownV2 )
84
+ bot.reply(to = pin.request, text = beggar(pins, pin.price), parseMode = MarkdownV2ParseMode )
85
85
pinsShop(pin)
86
86
87
87
return
88
88
}
89
89
90
90
if (pinDAO.findByChatId(pin.chat.id.chatId).size >= 5 ) {
91
- bot.reply(to = pin.request, text = tooManyPinnedMessages(), parseMode = MarkdownV2 )
91
+ bot.reply(to = pin.request, text = tooManyPinnedMessages(), parseMode = MarkdownV2ParseMode )
92
92
93
93
return
94
94
}
0 commit comments