public static InlineKeyboardButton SetCallbackGame(string text, CallbackGame callbackGame)
 {
     return(new InlineKeyboardButton(text)
     {
         CallbackGame = callbackGame
     });
 }
Ejemplo n.º 2
0
        public static void addGameButton(this KeyboardMarkup source, string Text, CallbackGame game, int row)
        {
            source.initRows(row);
            InlineKeyboardButton button = new InlineKeyboardButton()
            {
                text = Text, callback_game = game
            };

            source.Keyboard[row].Add(button);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates an inline keyboard button. Pressing the button will launch the game.
 /// </summary>
 /// <param name="text">Label text on the button</param>
 /// <param name="callbackGame">Description of the game that will be launched when the user presses the button.</param>
 public static InlineKeyboardButton WithCallBackGame(string text, CallbackGame callbackGame) =>
 new InlineKeyboardButton
 {
     Text         = text,
     CallbackGame = callbackGame
 };
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InlineKeyboardButton"/> class.
 /// </summary>
 /// <param name="text">Text of the button</param>
 /// <param name="callbackGame">Description of the game that will be launched when the user presses the button.</param>
 public static InlineKeyboardButton WithCallBackGame(string text, CallbackGame callbackGame)
 => new InlineKeyboardCallbackGameButton(text, callbackGame);
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InlineKeyboardButton"/> class.
 /// </summary>
 /// <param name="text">Text of the button</param>
 /// <param name="callbackGame"></param>
 public InlineKeyboardButton(string text, CallbackGame callbackGame) : this(text)
 {
     CallbackGame = callbackGame;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InlineKeyboardButton"/> class.
 /// </summary>
 /// <param name="text">Text of the button</param>
 /// <param name="callbackGame">Description of the game that will be launched when the user presses the button.</param>
 public InlineKeyboardCallbackGameButton(string text, CallbackGame callbackGame) : base(text)
 {
     CallbackGame = callbackGame;
 }