Skip to content

Commit 367b080

Browse files
committed
Add support for Russian bot command registration
Previously, bot commands were registered only in English. This update adds a new code block to register the same set of commands with their descriptions in Russian, enabling bilingual support for bot commands.
1 parent 3852af8 commit 367b080

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Sources/TelegramBot.ConsoleTest/Program.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ public static void Main(string[] args)
1919
.RegisterCommand("/burgers", "shows burgers menu")
2020
.RegisterCommand("/burgersdone", "notifies that the order is ready")
2121
.RegisterCommand("/receipt", "shows the receipt");
22-
}, "en");
22+
}, "en")
23+
.RegisterCommands(x =>
24+
{
25+
x.RegisterCommand("/start", "инициирует бота")
26+
.RegisterCommand("/help", "показывает сообщение справки")
27+
.RegisterCommand("/burgers", "показывает меню бургеров")
28+
.RegisterCommand("/burgersdone", "уведомляет о готовности заказа")
29+
.RegisterCommand("/receipt", "показывает чек");
30+
}, "ru");
2331

2432
builder.Services
2533
.AddDbContext<AppDbContext>(x => x.UseSqlite("Data Source=app.db"))

0 commit comments

Comments
 (0)