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

Made CallbackGame model serializable #128

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

kvokov
Copy link

@kvokov kvokov commented Oct 5, 2016

Also please add export of CallbackGame in Models.js file, it's missing now.

@Naltox
Copy link
Owner

Naltox commented Oct 6, 2016

Hey, i dont think there is a reason to make it serializable because its just a placeholder

@kvokov
Copy link
Author

kvokov commented Oct 6, 2016

Just because I wanna do the things like

let keyboard = new InlineKeyboardMarkup([[
    new InlineKeyboardButton('Play Game', null, null, null, null, new CallbackGame())
]]);
scope.api.sendGame(scope.chatId, config.gameShortName, {
    reply_markup: JSON.stringify(keyboard.toJSON())
})

@kvokov
Copy link
Author

kvokov commented Oct 6, 2016

I'm pretty sure that all models should have such methods, so will be cool to extend some BaseModel or add mixins

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