You need to use the new Context, here is an example: `def buttons(bot, update):` into `def buttons(update, context): bot = context.bot ....`