Skip to content
This repository was archived by the owner on Jul 8, 2026. It is now read-only.

Commit 0fc7b50

Browse files
authored
Merge pull request #275 from SeyedHashtag/good
Enhance telegram bot user interface by adding emojies
2 parents 52929d6 + 74c6bcf commit 0fc7b50

6 files changed

Lines changed: 16 additions & 16 deletions

File tree

core/scripts/telegrambot/utils/adduser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def create_cancel_markup(back_step=None):
1616
markup.row(types.KeyboardButton("❌ Cancel"))
1717
return markup
1818

19-
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == 'Add User')
19+
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == 'Add User')
2020
def add_user(message):
2121
msg = bot.reply_to(message, "Enter username (only letters, numbers, and underscores are allowed):", reply_markup=create_cancel_markup())
2222
bot.register_next_step_handler(msg, process_add_user_step1)

core/scripts/telegrambot/utils/backup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from utils.command import *
1212

1313

14-
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == 'Backup Server')
14+
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == '💾 Backup Server')
1515
def backup_server(message):
1616
bot.reply_to(message, "Starting backup. This may take a few moments...")
1717
bot.send_chat_action(message.chat.id, 'typing')

core/scripts/telegrambot/utils/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
def create_main_markup():
44
markup = types.ReplyKeyboardMarkup(resize_keyboard=True)
5-
markup.row('Add User', 'Show User')
6-
markup.row('Delete User', 'Server Info')
7-
markup.row('Backup Server')
5+
markup.row('Add User', '🔍 Show User')
6+
markup.row('🗑️ Delete User', '🖥️ Server Info')
7+
markup.row('💾 Backup Server')
88
return markup

core/scripts/telegrambot/utils/deleteuser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def handle_cancel_delete(call):
99
bot.edit_message_text("Operation canceled.", chat_id=call.message.chat.id, message_id=call.message.message_id)
1010
create_main_markup(call.message)
1111

12-
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == 'Delete User')
12+
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == '🗑️ Delete User')
1313
def delete_user(message):
1414
markup = types.InlineKeyboardMarkup()
1515
cancel_button = types.InlineKeyboardButton("❌ Cancel", callback_data="cancel_delete")

core/scripts/telegrambot/utils/edituser.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def handle_cancel_show_user(call):
1414
bot.edit_message_text("Operation canceled.", chat_id=call.message.chat.id, message_id=call.message.message_id)
1515
create_main_markup(call.message)
1616

17-
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == 'Show User')
17+
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == '🔍 Show User')
1818
def show_user(message):
1919
markup = types.InlineKeyboardMarkup()
2020
cancel_button = types.InlineKeyboardButton("❌ Cancel", callback_data="cancel_show_user")
@@ -106,14 +106,14 @@ def process_show_user(message):
106106
bio.seek(0)
107107

108108
markup = types.InlineKeyboardMarkup(row_width=3)
109-
markup.add(types.InlineKeyboardButton("Reset User", callback_data=f"reset_user:{actual_username}"),
110-
types.InlineKeyboardButton("IPv6-URI", callback_data=f"ipv6_uri:{actual_username}"))
111-
markup.add(types.InlineKeyboardButton("Edit Username", callback_data=f"edit_username:{actual_username}"),
112-
types.InlineKeyboardButton("Edit Traffic Limit", callback_data=f"edit_traffic:{actual_username}"))
113-
markup.add(types.InlineKeyboardButton("Edit Expiration Days", callback_data=f"edit_expiration:{actual_username}"),
114-
types.InlineKeyboardButton("Renew Password", callback_data=f"renew_password:{actual_username}"))
115-
markup.add(types.InlineKeyboardButton("Renew Creation Date", callback_data=f"renew_creation:{actual_username}"),
116-
types.InlineKeyboardButton("Block User", callback_data=f"block_user:{actual_username}"))
109+
markup.add(types.InlineKeyboardButton("🔄 Reset User", callback_data=f"reset_user:{actual_username}"),
110+
types.InlineKeyboardButton("🌐 IPv6-URI", callback_data=f"ipv6_uri:{actual_username}"))
111+
markup.add(types.InlineKeyboardButton("✏️ Edit Username", callback_data=f"edit_username:{actual_username}"),
112+
types.InlineKeyboardButton("📶 Edit Traffic", callback_data=f"edit_traffic:{actual_username}"))
113+
markup.add(types.InlineKeyboardButton("📅 Edit Expiration", callback_data=f"edit_expiration:{actual_username}"),
114+
types.InlineKeyboardButton("🔑 Renew Password", callback_data=f"renew_password:{actual_username}"))
115+
markup.add(types.InlineKeyboardButton("🕒 Renew Creation Date", callback_data=f"renew_creation:{actual_username}"),
116+
types.InlineKeyboardButton("Block User", callback_data=f"block_user:{actual_username}"))
117117

118118
caption = formatted_details
119119
if uri_v4:

core/scripts/telegrambot/utils/serverinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from telebot import types
33
from utils.command import *
44

5-
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == 'Server Info')
5+
@bot.message_handler(func=lambda message: is_admin(message.from_user.id) and message.text == '🖥️ Server Info')
66
def server_info(message):
77
command = f"python3 {CLI_PATH} server-info"
88
result = run_cli_command(command)

0 commit comments

Comments
 (0)