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

Refactor default command to accept raw text #24

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

Conversation

FMCorz
Copy link

@FMCorz FMCorz commented Mar 31, 2017

Hi,

during my attempts to use this library, I found that it was missing simple view that allowed me to just reply to a message with raw text. Creating a template can sometimes be an issue, or an overkill, depending on the situation. Especially when new to Django which is my case.

I have tried to refactor the TemplateCommandView the best I could, with a new BaseCommandView which could be the base for other types of actions (creating records for instance), and another base SendMessageCommandView which is the base for anything to send a message, which TemplateCommandView now extends.

Keeping full backwards compatibility has been in my mind. Which I think I achieved, except for the import of TemplateCommandView from telegrambot.bot_views.generic.base which now is in message, but importing from telegrambot.bot_views.generic still works.

Let me know what you think.

(This is rebased on my branch tests which #23 is based on as well, so only this commit is new: 6d78ea1)

@coveralls
Copy link

coveralls commented Mar 31, 2017

Coverage Status

Coverage decreased (-0.6%) to 95.501% when pulling 6d78ea1 on FMCorz:send-message-command into ef6a5c2 on jlmadurga:master.

@FMCorz
Copy link
Author

FMCorz commented Mar 31, 2017

I'm trying to figure out why I've got all these failures for Python 3 now...

@coveralls
Copy link

coveralls commented Mar 31, 2017

Coverage Status

Coverage decreased (-0.5%) to 95.64% when pulling 637a68f on FMCorz:send-message-command into 5141ed0 on jlmadurga:master.

@coveralls
Copy link

coveralls commented Mar 31, 2017

Coverage Status

Coverage increased (+0.2%) to 96.408% when pulling 30d8c09 on FMCorz:send-message-command into 5141ed0 on jlmadurga:master.

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