feat: add Submit As Enable in telegram bot
This commit is contained in:
1 parent
d54e7a9b14
commit
be8d55dadb
14 files changed
+65
-33
No files matched your search
@@ -1413,6 +1413,16 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
|
||||
t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
|
||||
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.successfulOperation"), tu.ReplyKeyboardRemove())
|
||||
}
|
||||
case "add_client_submit_enable":
|
||||
client_Enable = true
|
||||
_, err := t.SubmitAddClient()
|
||||
if err != nil {
|
||||
errorMessage := fmt.Sprintf("%v", err)
|
||||
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.messages.error_add_client", "error=="+errorMessage), tu.ReplyKeyboardRemove())
|
||||
} else {
|
||||
t.deleteMessageTgBot(chatId, callbackQuery.Message.GetMessageID())
|
||||
t.SendMsgToTgbot(chatId, t.I18nBot("tgbot.answers.successfulOperation"), tu.ReplyKeyboardRemove())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2216,6 +2226,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
|
||||
),
|
||||
tu.InlineKeyboardRow(
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
|
||||
),
|
||||
tu.InlineKeyboardRow(
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
|
||||
),
|
||||
)
|
||||
@@ -2239,6 +2252,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
|
||||
),
|
||||
tu.InlineKeyboardRow(
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
|
||||
),
|
||||
tu.InlineKeyboardRow(
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
|
||||
),
|
||||
)
|
||||
@@ -2262,6 +2278,9 @@ func (t *Tgbot) addClient(chatId int64, msg string, messageID ...int) {
|
||||
),
|
||||
tu.InlineKeyboardRow(
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitDisable")).WithCallbackData("add_client_submit_disable"),
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.submitEnable")).WithCallbackData("add_client_submit_enable"),
|
||||
),
|
||||
tu.InlineKeyboardRow(
|
||||
tu.InlineKeyboardButton(t.I18nBot("tgbot.buttons.cancel")).WithCallbackData("add_client_cancel"),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -641,13 +641,14 @@
|
||||
"getBanLogs" = "احصل على سجلات الحظر"
|
||||
"allClients" = "كل العملاء"
|
||||
|
||||
"addClient" = "أضف عميل"
|
||||
"submitDisable" = "اعتمد على إنه معطل ✅"
|
||||
"use_default" = "🏷️ استخدم الافتراضي"
|
||||
"change_id" = "⚙️🔑 تغيير الـ ID"
|
||||
"change_password" = "⚙️🔑 تغيير الباسورد"
|
||||
"change_email" = "⚙️📧 تغيير الإيميل"
|
||||
"change_comment" = "⚙️💬 تغيير التعليق"
|
||||
"addClient" = "إضافة عميل"
|
||||
"submitDisable" = "إرسال كمعطّل ☑️"
|
||||
"submitEnable" = "إرسال كمفعّل ✅"
|
||||
"use_default" = "🏷️ استخدام الإعدادات الافتراضية"
|
||||
"change_id" = "⚙️🔑 المعرّف"
|
||||
"change_password" = "⚙️🔑 كلمة السر"
|
||||
"change_email" = "⚙️📧 البريد الإلكتروني"
|
||||
"change_comment" = "⚙️💬 تعليق"
|
||||
|
||||
[tgbot.answers]
|
||||
"successfulOperation" = "✅ العملية نجحت!"
|
||||
|
||||
@@ -642,7 +642,8 @@
|
||||
"allClients" = "All Clients"
|
||||
|
||||
"addClient" = "Add Client"
|
||||
"submitDisable" = "Submit As Disable ✅"
|
||||
"submitDisable" = "Submit As Disable ☑️"
|
||||
"submitEnable" = "Submit As Enable ✅"
|
||||
"use_default" = "🏷️ Use default"
|
||||
"change_id" = "⚙️🔑 ID"
|
||||
"change_password" = "⚙️🔑 Password"
|
||||
|
||||
Loaded 3 of 14 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user