1
0
This commit is contained in:
2025-07-24 00:18:47 +02:00

8
bot.py
View File

@@ -42,13 +42,13 @@ async def echo(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
await update.message.reply_text(_botsyms.WIP_MSG) await update.message.reply_text(_botsyms.WIP_MSG)
async def add_player(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: async def add_player(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
player= 'XXX' #XXX implement me, get from user request name= " ".join(context.args)
print(f'sto aggiungendo il giocatore {player} all\'arena') print(f'sto aggiungendo il giocatore {name} all\'arena')
_brsim.BrSimArena _brsim.BrSimArena
Arena= context.application.bot_data['arena'] Arena= context.application.bot_data['arena']
Arena.add_player(player) Arena.add_player(name)
print(f'Giocatori: {Arena.get_players()}') print(f'Giocatori: {Arena.get_players()}')
print(f'Ecco il mondo di gioco, questi sono i giocatori: {Arena.get_players()}') await update.message.reply_text(f'Ecco i giocatori presenti nel mondo do gioco: \n{Arena.get_players()}')
def main(): def main():