Skip to content

Commit 9dcc9a9

Browse files
committed
Update to ptb v12.0.0b0
1 parent b1b1e69 commit 9dcc9a9

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

bot/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def help_handler(update: Update, context: CallbackContext):
5757
]
5858
if not private:
5959
steps.insert(1, f'Go to a private chat with me, by clicking here: {context.bot.name}.')
60-
text = '\n\n'.join(f'{i+1}️⃣ {step}' for i, step in enumerate(steps))
60+
text = '\n\n'.join(f'{i + 1}️⃣ {step}' for i, step in enumerate(steps))
6161
msg.reply_text(f'<b>Github notification guide.</b>\n\n{text}\n\n'
6262
f'Note that GitHub Help has more in depth guides on how to install GitHub Apps <a href="https://help.github.com/articles/installing-an-app-in-your-personal-account/#installing-a-github-app-in-your-personal-account">in your personal account</a> or <a href="https://help.github.com/articles/installing-an-app-in-your-organization/#installing-a-github-app-in-your-organization">in your organisation</a> if you are having trouble with step 1.',
6363
reply_markup=InlineKeyboardMarkup([
@@ -92,6 +92,7 @@ def login_handler(update: Update, context):
9292
context.menu_stack = ['settings']
9393
reply_menu(update, context, settings.login_menu)
9494

95+
9596
def delete_job(context: CallbackContext):
9697
context.job.context.delete()
9798

@@ -162,8 +163,7 @@ def reply_handler(update: Update, context: CallbackContext):
162163
settings.add_handlers(dp)
163164

164165
# For commenting on issues/PR/reviews
165-
dp.add_handler(MessageHandler(Filters.reply & reply_data_link_filter, reply_handler,
166-
channel_post_updates=False, edited_updates=False))
166+
dp.add_handler(MessageHandler(Filters.reply & reply_data_link_filter, reply_handler))
167167

168168
# Non-telegram updates
169169
github_handler = GithubHandler(dp)

bot/menu.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,9 @@ def check_update(self, update):
242242

243243
return stack, menu, match, action, other
244244

245-
def handle_update(self, update, dispatcher, check_result):
245+
def handle_update(self, update, dispatcher, check_result, context=None):
246246
stack, menu, match, action, other = check_result
247247

248-
context = CallbackContext.from_update(update, dispatcher)
249248
self.collect_additional_context(context, update, dispatcher, (action, stack, other, match))
250249

251250
return menu.handle_update(update, context)
@@ -255,7 +254,7 @@ def collect_additional_context(self, context, update, dispatcher, check_result):
255254
context.menu_action = action
256255
context.menu_other = other
257256
context.menu_stack = stack
258-
context.match = match
257+
context.matches = [match]
259258

260259

261260
def reply_menu(update, context, menu: Menu):

bot/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,4 @@ def add_handlers(dp: Dispatcher):
305305
]))
306306

307307
dp.add_handler(InlineQueryHandler(inline_add_repo, pattern=InlineQueries.add_repo + r'(.*)'))
308-
dp.add_handler(CommandHandler('add_repo', add_repo_command, allow_edited=False))
308+
dp.add_handler(CommandHandler('add_repo', add_repo_command))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy