コード例 #1
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);
        }
コード例 #2
0
        public static void addPayButton(this KeyboardMarkup source, string Text)
        {
            source.initRows(0);
            InlineKeyboardButton button = new InlineKeyboardButton()
            {
                text = Text, pay = true
            };

            source.Keyboard[0].Insert(0, button);
        }
コード例 #3
0
        public static void addCallbackButton(this KeyboardMarkup source, string Text, string Callback, int row)
        {
            source.initRows(row);
            InlineKeyboardButton button = new InlineKeyboardButton()
            {
                text = Text, callback_data = Callback
            };

            source.Keyboard[row].Add(button);
        }
コード例 #4
0
        public static void addSIQCCButton(this KeyboardMarkup source, string Text, string siq, int row)
        {
            source.initRows(row);
            InlineKeyboardButton button = new InlineKeyboardButton()
            {
                text = Text, switch_inline_query_current_chat = siq
            };

            source.Keyboard[row].Add(button);
        }
コード例 #5
0
        public static void addLoginButton(this KeyboardMarkup source, string Text, LoginUrl Url, int row)
        {
            source.initRows(row);
            InlineKeyboardButton button = new InlineKeyboardButton()
            {
                text = Text, login_url = Url
            };

            source.Keyboard[row].Add(button);
        }
コード例 #6
0
        public static KeyboardMarkup addSIQButton(this KeyboardMarkup source, string Text, string siq, int row)
        {
            source.initRows(row);
            InlineKeyboardButton button = new InlineKeyboardButton()
            {
                text = Text, switch_inline_query = siq
            };

            source.Keyboard[row].Add(button);
            return(source);
        }
コード例 #7
0
        public static KeyboardMarkup addUrlButton(this KeyboardMarkup source, string Text, string Url, int row)
        {
            source.initRows(row);
            InlineKeyboardButton button = new InlineKeyboardButton()
            {
                text = Text, url = Url
            };

            source.Keyboard[row].Add(button);
            return(source);
        }
コード例 #8
0
 public static void addButton(this KeyboardMarkup source, InlineKeyboardButton button, int row)
 {
     source.initRows(row);
     source.Keyboard[row].Add(button);
 }
コード例 #9
0
 public static void SetRowCount(this KeyboardMarkup source, int x)
 {
     source.initRows(x);
 }