Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Send ReplyMarkupRemove on Broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Nov 7, 2019
1 parent dc752ac commit 4f8b359
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## v1.2.0
- Completely revamp the user settings and /start interface
- Add a prompt whenn deleting all polls of a user
- Option to delete specific poll without removing all messages
- Add /settings command as shortcut to settings submenu
- Add a prompt when deleting all polls of a user
- Option to delete specific a poll without removing all messages
- Link in settings, which allows anybody to share the poll to arbitrary groups
- New doodle button layout. Old one can still be selectd in style settings
- New doodle button layout. Old one can still be selected in poll styling settings

- Lokalise integration
- New language Italian
Expand Down
2 changes: 1 addition & 1 deletion i18n/English.yml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ misc:
I really appreciate anything that helps me out and that keeps my server and me running ☺️.
If you like this project, check out my [Patreon page](https://www.patreon.com/nukesor) or support me via [PayPal](https://www.paypal.me/arnebeer).
If you like this project, check out my [Patreon page](https://www.patreon.com/nukesor) or consider supporting me via [PayPal](https://www.paypal.me/arnebeer).
If you have any questions, stop by my [support group](https://t.me/nukesors_projects).
Have great day!
Expand Down
15 changes: 13 additions & 2 deletions pollbot/telegram/commands/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Admin related stuff."""
import time
from telegram import ReplyKeyboardRemove
from telegram.ext import run_async
from telegram.error import BadRequest, Unauthorized

Expand Down Expand Up @@ -33,7 +34,12 @@ def broadcast(bot, update, session, user):
update.message.chat.send_message(f'Sending broadcast to {len(users)} chats.')
for user in users:
try:
bot.send_message(user.id, message, parse_mode='Markdown')
bot.send_message(
user.id,
message,
parse_mode='Markdown',
reply_markup=ReplyKeyboardRemove(),
)
user.started = True

# The chat doesn't exist any longer, delete it
Expand All @@ -59,4 +65,9 @@ def test_broadcast(bot, update, session, user):
"""Send the broadcast message to the admin for test purposes."""
message = update.message.text.split(' ', 1)[1].strip()

bot.send_message(user.id, message, parse_mode='Markdown')
bot.send_message(
user.id,
message,
parse_mode='Markdown',
reply_markup=ReplyKeyboardRemove(),
)

0 comments on commit 4f8b359

Please sign in to comment.