Skip to content

WIP: Implemented support for normal keyboards - #143

Open
MattiaEffendi wants to merge 6 commits into
python-botogram:masterfrom
MattiaEffendi:feature/keyboards
Open

WIP: Implemented support for normal keyboards#143
MattiaEffendi wants to merge 6 commits into
python-botogram:masterfrom
MattiaEffendi:feature/keyboards

Conversation

@MattiaEffendi

@MattiaEffendiMattiaEffendi commented Sep 8, 2019

Copy link
Copy Markdown

I've added the support for "standard" keyboards natively.
List of things i still have to do:

  • Code
  • Documentation

A test code could be the following:

@bot.command("keyboard")defkb(chat, message):
kb=botogram.Keyboard(one_time=True)
kb[0].text("Simple text")
kb[1].request_contact("Request contact")
kb[2].request_location("Request location")
chat.send("Message with a standard keyboard", attach=kb)
@bot.command("rem")defrem(chat, message):
chat.send("Keyboard removed", force_reply=True, remove_keyboard=True)

@MarcoBuster

Copy link
Copy Markdown
Member

Hi @MattiaEffendi and thank you for your PR!
You should check the Travis-CI log, because it seems that there are errors. Please write the documentation and the changelog according to the overall style. If you have questions write in our botogram devs group :)

@matteob99matteob99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing doc and changelog

Comment threadbotogram/objects/mixins.py Outdated
{"remove_keyboard": remove_keyboard}
)
if selective is not None:
args["reply_markup"] = json.dumps({"selective": selective})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this you replace you need to append

Comment threadbotogram/objects/mixins.py Outdated
if force_reply is not None:
args["reply_markup"] = json.dumps({"force_reply": force_reply})
if selective is not None:
args["reply_markup"] = json.dumps({"selective": selective})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with this you replace you need to append

@MarcoBuster

Copy link
Copy Markdown
Member

Hi @MattiaEffendi! Updates? :D

@matteob99matteob99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing doc and changelog

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@MattiaEffendi@MarcoBuster@matteob99