summaryrefslogtreecommitdiff
path: root/src/main/java/files/MyKeyboard.java
blob: 8beb6e2884fc44ea19cdcf4d8be2e442b444cfa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package files;

import com.pengrad.telegrambot.model.request.Keyboard;
import com.pengrad.telegrambot.model.request.InlineKeyboardButton;
import com.pengrad.telegrambot.model.request.InlineKeyboardMarkup;
import com.pengrad.telegrambot.model.request.ReplyKeyboardMarkup;

public class MyKeyboard {
    public static Keyboard getMain() {
        return new ReplyKeyboardMarkup(
                new String[]{"Поиск аниме"},
                new String[]{"Недавно добавленные аниме"},
                new String[]{"Новинки аниме"},
                new String[]{"Случайное аниме"})
                .oneTimeKeyboard(true)
                .resizeKeyboard(true)
                .selective(true);
    }

    public static Keyboard getCarousel(String typeOfAnime) {
        return new InlineKeyboardMarkup(
                new InlineKeyboardButton("<").callbackData("previous" + typeOfAnime),
                new InlineKeyboardButton(">").callbackData("next" + typeOfAnime));
    }
}