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

Commit 4f8b359

Browse files
committed
Send ReplyMarkupRemove on Broadcast
1 parent dc752ac commit 4f8b359

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

CHANGELOG.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
## v1.2.0
22
- Completely revamp the user settings and /start interface
3-
- Add a prompt whenn deleting all polls of a user
4-
- Option to delete specific poll without removing all messages
3+
- Add /settings command as shortcut to settings submenu
4+
- Add a prompt when deleting all polls of a user
5+
- Option to delete specific a poll without removing all messages
56
- Link in settings, which allows anybody to share the poll to arbitrary groups
6-
- New doodle button layout. Old one can still be selectd in style settings
7+
- New doodle button layout. Old one can still be selected in poll styling settings
78

89
- Lokalise integration
910
- New language Italian

i18n/English.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ misc:
323323
324324
I really appreciate anything that helps me out and that keeps my server and me running ☺️.
325325
326-
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).
326+
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).
327327
If you have any questions, stop by my [support group](https://t.me/nukesors_projects).
328328
329329
Have great day!

pollbot/telegram/commands/admin.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Admin related stuff."""
22
import time
3+
from telegram import ReplyKeyboardRemove
34
from telegram.ext import run_async
45
from telegram.error import BadRequest, Unauthorized
56

@@ -33,7 +34,12 @@ def broadcast(bot, update, session, user):
3334
update.message.chat.send_message(f'Sending broadcast to {len(users)} chats.')
3435
for user in users:
3536
try:
36-
bot.send_message(user.id, message, parse_mode='Markdown')
37+
bot.send_message(
38+
user.id,
39+
message,
40+
parse_mode='Markdown',
41+
reply_markup=ReplyKeyboardRemove(),
42+
)
3743
user.started = True
3844

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

62-
bot.send_message(user.id, message, parse_mode='Markdown')
68+
bot.send_message(
69+
user.id,
70+
message,
71+
parse_mode='Markdown',
72+
reply_markup=ReplyKeyboardRemove(),
73+
)

0 commit comments

Comments
 (0)