[][src]Module vk_bot::keyboard

Keyboards.

Example

Keyboard::new(
    vec![
        vec![
            Button::new("A", Color::Primary, None),
            Button::new("B", Color::Default, None),
        ],
        vec![
            Button::new("C", Color::Positive, None),
            Button::new("D", Color::Negative, Some("{\"payload\": \"json\"}".into())),
        ],
    ],
    false,
);

will look like this:

This example is not tested
+-------+-------+
|   A   |   B   |
+-------+-------+
|   C   |   D   |
+-------+-------+

Structs

Button

A button of a keyboard.

ButtonAction

A Button's "action".

Keyboard

A keyboard consisting of Buttons that may be shown to the user instead of the regular keyboard.

Enums

Color

The color of a button.