Skip to content

Commit

Permalink
feat(Group): add a state and a keyboard submenu
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenonEl committed Jan 2, 2025
1 parent 29c9ea8 commit 499ee05
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
7 changes: 7 additions & 0 deletions TelegramBot/States/States.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,11 @@ public enum UserInboundState
SelectInvite,
ProcessAction,
Finish
}

public enum UsersGroupState
{
ProcessAction,
ProcessData,
Finish
}
39 changes: 39 additions & 0 deletions TelegramBot/Utils/Keyboard/Group.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using Telegram.Bot;
using Telegram.Bot.Types;
using Telegram.Bot.Types.ReplyMarkups;
using DataBase;
using TelegramMediaRelayBot;


namespace MediaTelegramBot.Utils;

public static class UsersGroup
{
public static InlineKeyboardMarkup GetUsersGroupActionsKeyboardMarkup()
{
var inlineKeyboard = new InlineKeyboardMarkup(new[]
{
new[]
{
InlineKeyboardButton.WithCallbackData(Config.GetResourceString("CreateGroupButtonText"), $"user_create_group"),
},
new[]
{
InlineKeyboardButton.WithCallbackData(Config.GetResourceString("EditGroupButtonText"), $"user_edit_group"),
},
new[]
{
InlineKeyboardButton.WithCallbackData(Config.GetResourceString("ChangeIsDefaultEnabled"), $"user_change_is_default"),
},
new[]
{
InlineKeyboardButton.WithCallbackData(Config.GetResourceString("DeleteGroupButtonText"), $"user_delete_group"),
},
new[]
{
KeyboardUtils.GetReturnButton()
},
});
return inlineKeyboard;
}
}

0 comments on commit 499ee05

Please sign in to comment.