mirror of
https://github.com/RYGhub/royal-mifia.git
synced 2024-11-29 00:54:18 +00:00
Messo #7. Veramente.
This commit is contained in:
parent
915c9522cc
commit
3e7af71843
1 changed files with 13 additions and 3 deletions
16
main.py
16
main.py
|
@ -587,15 +587,25 @@ def kill(bot, update):
|
|||
target = game.findplayerbyusername(update.message.text.split(' ')[1])
|
||||
if target is not None:
|
||||
target.kill()
|
||||
bot.sendMessage(update.message.chat['id'], s.admin_killed.format(name=target.tusername, icon=target.role.icon, role=target.role.name))
|
||||
game.message(bot, s.admin_killed.format(name=target.tusername, icon=target.role.icon, role=target.role.name))
|
||||
else:
|
||||
bot.sendMessage(update.message.chat['id'], s.error_username)
|
||||
game.message(bot, s.error_username)
|
||||
else:
|
||||
bot.sendMessage(update.message.chat['id'], s.error_not_admin)
|
||||
game.message(bot, s.error_not_admin)
|
||||
else:
|
||||
bot.sendMessage(update.message.chat['id'], s.error_no_games_found)
|
||||
|
||||
|
||||
def fakerole(bot, update):
|
||||
"""Manda un finto messaggio di ruolo."""
|
||||
if update.message.chat['type'] == 'private':
|
||||
bot.sendMessage(update.message.chat['id'], s.role_assigned.format(icon=s.royal_icon, name=s.royal_name))
|
||||
bot.sendMessage(update.message.chat['id'], s.role_assigned.format(icon=s.mifia_icon, name=s.mifia_name))
|
||||
bot.sendMessage(update.message.chat['id'], s.role_assigned.format(icon=s.detective_icon, name=s.detective_name))
|
||||
bot.sendMessage(update.message.chat['id'], s.role_assigned.format(icon=s.angel_icon, name=s.angel_name))
|
||||
else:
|
||||
bot.sendMessage(update.message.chat['id'], s.error_private_required)
|
||||
|
||||
updater.dispatcher.addHandler(CommandHandler('ping', ping))
|
||||
updater.dispatcher.addHandler(CommandHandler('newgame', newgame))
|
||||
updater.dispatcher.addHandler(CommandHandler('join', join))
|
||||
|
|
Loading…
Reference in a new issue