Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Mode Setting for KeyBoard #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laskarazhar-hiveup
Copy link

@laskarazhar-hiveup laskarazhar-hiveup commented Sep 30, 2019

Usage

$keyboard = Keyboard::create(Keyboard::TYPE_KEYBOARD)->oneTimeKeyboard()->conParseMode('Markdown')
            ->addRow(KeyboardButton::create('☹️')->callbackData('1'))
            ->addRow(KeyboardButton::create('🙁')->callbackData('2'))
            ->addRow(KeyboardButton::create('😐')->callbackData('3'))
            ->addRow(KeyboardButton::create('🙂')->callbackData('4'))
            ->addRow(KeyboardButton::create('😊')->callbackData('5'))
            ->toArray();

Usage

```$keyboard = Keyboard::create(Keyboard::TYPE_KEYBOARD)->oneTimeKeyboard()->conParseMode('Markdown')
            ->addRow(KeyboardButton::create('☹️')->callbackData('1'))
            ->addRow(KeyboardButton::create('🙁')->callbackData('2'))
            ->addRow(KeyboardButton::create('😐')->callbackData('3'))
            ->addRow(KeyboardButton::create('🙂')->callbackData('4'))
            ->addRow(KeyboardButton::create('😊')->callbackData('5'))
            ->toArray();```
@filippotoso
Copy link
Contributor

Please refactor the commit as follows:

  1. Make $parseMode null by default
  2. Don't add the parseMode parameter if it's null
  3. Rename the conParseMode() method into parseMode()

This changes are required for consistency and to maintain the existing behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants