[][src]Module vk_bot::keyboard

Keyboards.

Example

Keyboard::new(
    // Vec of rows
    vec![
        // Row 0
        vec![
            Button::text("A", Color::Primary, None),
            Button::text("B", Color::Secondary, None),
        ],
        // Row 1
        vec![
            Button::text("C", Color::Positive, None),
            Button::text("D", Color::Negative, Some(r#"{"payload": "json"}"#.into())),
        ],
    ],
    false,
);

will look like this:

        column 0    column 1
      +-----------+-----------+
row 0 |     A     |     B     |
      +-----------+-----------+
row 1 |     C     |     D     |
      +-----------+-----------+

Structs

Button

A button of a keyboard.

ColorFromStrError

Error type for impl FromStr for Color.

Keyboard

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

Enums

Action

A Button's action.

Color

The color of a button.