Add a way to kick the current player
so that we don't have to wait many seconds until we can skip a (dead) player
This commit is contained in:
parent
94ea61e941
commit
4c900f941a
1 changed files with 4 additions and 1 deletions
5
bot.py
5
bot.py
|
@ -245,6 +245,8 @@ def kick_player(bot, update):
|
||||||
|
|
||||||
if update.message.reply_to_message:
|
if update.message.reply_to_message:
|
||||||
kicked = update.message.reply_to_message.from_user
|
kicked = update.message.reply_to_message.from_user
|
||||||
|
if kicked.id == bot.id:
|
||||||
|
kicked = game.current_player.user
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gm.leave_game(kicked, chat)
|
gm.leave_game(kicked, chat)
|
||||||
|
@ -266,7 +268,8 @@ def kick_player(bot, update):
|
||||||
|
|
||||||
else:
|
else:
|
||||||
send_async(bot, chat.id,
|
send_async(bot, chat.id,
|
||||||
text=_("Please reply to the person you want to kick and type /kick again."),
|
text=_("Please reply to the person you want to kick and type /kick again. "
|
||||||
|
"Note that replying to the bot causes the current player to be kicked."),
|
||||||
reply_to_message_id=update.message.message_id)
|
reply_to_message_id=update.message.message_id)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue