forked from Kylmakalle/heroku-telegram-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
27 lines (21 loc) · 763 Bytes
/
bot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- coding: utf-8 -*-
import redis
import os
import telebot
# import some_api_lib
# import ...
# Example of your code beginning
# Config vars
token = os.environ['TELEGRAM_TOKEN']
some_api_token = os.environ['SOME_API_TOKEN']
# ...
# If you use redis, install this add-on https://elements.heroku.com/addons/heroku-redis
r = redis.from_url(os.environ.get("REDIS_URL"))
# Your bot code below
bot = telebot.TeleBot(token)
some_api = some_api_lib.connect(some_api_token)
keyboard1 = telebot.types.ReplyKeyboardMarkup()
keyboard1.row('Wallet', 'Buy Postage')
keyboard2 = telebot.types.ReplyKeyboardMarkup()
keyboard2.row('Settings', 'Support')
ReplyKeyboardMarkup = keyboard1.resize_keyboard, keyboard2.resize_keyboard = True, True