Skip to content

Commit

Permalink
Add current groups displaying on change
Browse files Browse the repository at this point in the history
  • Loading branch information
wh0o7 committed Oct 21, 2023
1 parent 157ab0e commit 0fbcc37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion StudentsTimetable/Services/CommandsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using MongoDB.Driver;
using StudentsTimetable.Config;
using Telegram.BotAPI.AvailableMethods;
using Telegram.BotAPI.AvailableMethods.FormattingOptions;
using Telegram.BotAPI.AvailableTypes;
using TelegramBot_Timetable_Core;
using TelegramBot_Timetable_Core.Config;
Expand Down Expand Up @@ -110,7 +111,11 @@ private async void OnMessageReceive(Message message)
case "👨‍👨‍👧‍👦Сменить группу👨‍👨‍👧‍👦":
{
this._botService.SendMessage(
new SendMessageArgs(sender.Id, "Для выбора групп отправьте её номера.(Максимум - 5 групп. Пример: 160, 161, 166,53, 54)"));
new SendMessageArgs(sender.Id,
$"Для выбора групп отправьте её номера.(Максимум - 5 групп. Пример: 160, 161, 166,53, 54)\nВаши выбранные группы:```{string.Join(", ", (await this._accountService.GetUserById(sender.Id))?.Groups ?? Array.Empty<string>())}```")
{
ParseMode = ParseMode.Markdown
});
this._mongoService.CreateState(new UserState(message.Chat.Id, "changeGroup"));
break;
}
Expand Down

0 comments on commit 0fbcc37

Please sign in to comment.