diff --git a/bots/modules/ping.py b/bots/modules/ping.py index d753777..fe60376 100644 --- a/bots/modules/ping.py +++ b/bots/modules/ping.py @@ -38,21 +38,21 @@ class PingBotModuleConfig(TelegramBotModuleConfig): return obj def i_am_handler(self, update: Update, ctx: CallbackContext): - _, category = update.effective_message.text.split() + _, category = update.effective_message.text.split(maxsplit=1) cat = self.get_category(update, category) cat.add_user(update.effective_user.id) cat.save() update.effective_message.reply_text('Done') def i_am_not_handler(self, update: Update, ctx: CallbackContext): - _, category = update.effective_message.text.split() + _, category = update.effective_message.text.split(maxsplit=1) cat = self.get_category(update, category) cat.remove_user(update.effective_user.id) cat.save() update.effective_message.reply_text('Done') def ping_handler(self, update: Update, ctx: CallbackContext): - _, category = update.effective_message.text.split() + _, category = update.effective_message.text.split(maxsplit=1) cat = self.get_category(update, category) if not cat.user_ids: return update.effective_message.reply_text(self.no_users_text)