mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 13:32:24 +00:00
- delete message after cancel
This commit is contained in:
parent
9159b8eb21
commit
5a1f035833
1 changed files with 4 additions and 3 deletions
|
@ -1384,11 +1384,13 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
|
||||||
)
|
)
|
||||||
t.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)
|
t.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)
|
||||||
case "add_client_default_info":
|
case "add_client_default_info":
|
||||||
|
t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
|
||||||
t.SendMsgToTgbotDeleteAfter(chatId, t.I18nBot("tgbot.messages.using_default_value"), 3, tu.ReplyKeyboardRemove())
|
t.SendMsgToTgbotDeleteAfter(chatId, t.I18nBot("tgbot.messages.using_default_value"), 3, tu.ReplyKeyboardRemove())
|
||||||
delete(userStates, chatId)
|
delete(userStates, chatId)
|
||||||
case "add_client_cancel":
|
case "add_client_cancel":
|
||||||
delete(userStates, chatId)
|
delete(userStates, chatId)
|
||||||
t.SendMsgToTgbotDeleteAfter(chatId, t.I18nBot("tgbot.messages.cancel"), 5, tu.ReplyKeyboardRemove())
|
t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
|
||||||
|
t.SendMsgToTgbotDeleteAfter(chatId, t.I18nBot("tgbot.messages.cancel"), 3, tu.ReplyKeyboardRemove())
|
||||||
case "add_client_default_traffic_exp":
|
case "add_client_default_traffic_exp":
|
||||||
messageId := callbackQuery.Message.GetMessageID()
|
messageId := callbackQuery.Message.GetMessageID()
|
||||||
inbound, err := t.inboundService.GetInbound(receiver_inbound_ID)
|
inbound, err := t.inboundService.GetInbound(receiver_inbound_ID)
|
||||||
|
@ -2249,7 +2251,6 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
|
||||||
} else {
|
} else {
|
||||||
t.SendMsgToTgbot(chatId, msg, inlineKeyboard)
|
t.SendMsgToTgbot(chatId, msg, inlineKeyboard)
|
||||||
}
|
}
|
||||||
|
|
||||||
case model.Shadowsocks:
|
case model.Shadowsocks:
|
||||||
inlineKeyboard := tu.InlineKeyboard(
|
inlineKeyboard := tu.InlineKeyboard(
|
||||||
tu.InlineKeyboardRow(
|
tu.InlineKeyboardRow(
|
||||||
|
|
Loading…
Reference in a new issue