コード例 #1
0
     }, {
         'command': "1.2",
         'text': "button 2"
     }],
     [{
         'command': "2.1",
         'text': "button 3"
     }, {
         'command': "2.2",
         'text': "button 4"
     }, {
         'command': "2.3",
         'text': "button 5"
     }],
 ]
 keyboard2 = bot.make_keyboard('Back')
 keyboard3 = bot.make_keyboard('Button1|Button2|Button3')
 keyboard4 = bot.make_keyboard(
     'Button1|Button2|Button3\nButton4\nButton5|Button6')
 keyboard5 = bot.make_keyboard([['Row1Button1', 'Row1Button2'],
                                ['Row2Button1']])
 keyboard6 = bot.make_keyboard([[['Row1Button1', 'help'],
                                 ['Row1Button2', 'back']],
                                [['Row2Button1', 'options']]])
 keyboard7 = bot.make_keyboard([[{
     'text': 'Row1Button1'
 }, {
     'text': 'Row1Button2'
 }], [{
     'text': 'Row2Button1'
 }]])
コード例 #2
0
from soroush_python_sdk import Client

DEBUG = False
DEBUG_PAGE = 10
bot_token = "jj5nH1BoZJsbHplz2v8DkiUHZv8o-uCn4c6AHJIxYP-OY_kNt63W0qHl6Wph7HhNzkVGXQ6x4IM9YFcWmMdEtf-uBRvnsZF97w78T" \
            "8GpG0Bv7SVLIv1FwM-uMKCGv2PBMfBb7flzBMvtlCZ1"

user = {'ali': 'NFiDxo8BngUgqnBRPKVqR8jwCqH-38zxDOeDDy_f7bUCOLgHJkJZJJIU75U'}
bot_admins = ('NFiDxo8BngUgqnBRPKVqR8jwCqH-38zxDOeDDy_f7bUCOLgHJkJZJJIU75U', )
# '7UhksfDFWrRkKaczg4Y3Wwho4rHNyzUQAenY9a4F5ZCdPJpUKjzMQ1WRerY', #ghodrati
# }
keyb = {
    'main': Client.make_keyboard("صفحه جدید|گزارشات"),
    'admin': Client.make_keyboard("/reload|/restart|/load")
}

VOICE_KEYS = {1: 'سعد الغامدی', 2: 'پرهیزگار'}
default_settings = {'voice': 1, 'reminder': 60 * 60}
MAX_PAGE = 604 if not DEBUG else DEBUG_PAGE
SEJDEH = (528, 597, 480, 416)