Skip to content

Instantly share code, notes, and snippets.

@mkushner
Created September 21, 2018 10:18
Show Gist options
  • Save mkushner/2bcad1f9ad0573780e4ef62e853618b1 to your computer and use it in GitHub Desktop.
Save mkushner/2bcad1f9ad0573780e4ef62e853618b1 to your computer and use it in GitHub Desktop.
bot_allow_access
def startCommand(bot, update):
print(f"BOT: start session from user: {update.message.chat_id}")
if ( update.message.chat_id in sekretniy_spisok_komu_mozhno_lezt_vnutr ):
access_keyboard = telegram.InlineKeyboardButton(text="Погнали!", callback_data="ffabb044431")
custom_keyboard = [[access_keyboard]]
reply_markup = telegram.InlineKeyboardMarkup(custom_keyboard)
bot.send_message(chat_id=update.message.chat_id, text='Бот готов служить!', reply_markup=reply_markup)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment