예제 #1
0
def get_auto_brand(bot: Bot, update: Update, user_data: dict) -> int:
    uid = update.message.from_user.id
    message = update.message.text
    if is_back(message):
        return start(bot, update)
    user_data['brand'] = message

    send_params = {
        'chat_id': uid,
        'text': 'Отлично! Что нужно починить?',
        'parse_mode': ParseMode.HTML,
        'reply_markup': ReplyKeyboardMarkup(back, resize_keyboard=1)
    }
    user_data['get_auto_brand'] = send_params
    bot.send_message(**send_params)
    return GET_REPAIR_DESCRIPTION
예제 #2
0
파일: app.py 프로젝트: Dimas4/Vk-Sound-Bot
from bot.bot import start

from exception.exception import ConfigDoesNotExist
from parse_config.parse_config import parse


if __name__ == "__main__":
    try:
        token, backend, db, filename = parse("config", "config.yaml")
    except ConfigDoesNotExist as e:
        print(repr(e))
        exit()

    start(token, backend, db, filename)
예제 #3
0
from bot import bot
import secrets.twitch
import asyncio
import time

if __name__ == "__main__":
    print("Booting ...")

    username = secrets.twitch.USERNAME
    app_id = secrets.twitch.APP_ID
    token = secrets.twitch.OAUTH_TOKEN
    channels = ["ricklesauceur"]

    irc = irc.IRCInterface(username, app_id, token, channels)
    irc.start()

    bot = bot.Bot()
    bot.irc_interface = irc

    bot.start()

    print("Running forever ...")

    try:
        while True:
            irc.run(forever=False)
            bot.tick()
            time.sleep(0.01)
    except KeyboardInterrupt:
        pass
예제 #4
0
def main():
    bot.start()
    # print_all_docs()
    pass
예제 #5
0
from bot import bot
from config import TOKEN

if __name__ == '__main__':
    bot.start(TOKEN)
예제 #6
0
def run_bot():
    print("Bot started...")
    bot.start()
예제 #7
0
from bot.bot import start

from exception.exception import ConfigDoesNotExist
from parse_config.parse_config import parse


if __name__ == "__main__":
    try:
        token, backend, db, dialog, filename = parse("config", "config.yaml")
    except ConfigDoesNotExist as e:
        print(repr(e))
        exit()

    start(token, backend, db, dialog, filename)
예제 #8
0
from bot.bot import start

from exception.exception import ConfigDoesNotExist
from parse_config.parse_config import parse


if __name__ == "__main__":
    try:
        token, backend, filename, model_name, size = parse("config", "config.yaml")
    except ConfigDoesNotExist as e:
        print(repr(e))
        exit()

    start(token, backend, filename, model_name, size)
예제 #9
0
파일: test.py 프로젝트: wxdong5211/tg-bot
# coding=utf-8
import time

__author__ = 'Invalid'

from bot import bot

if __name__ == '__main__':
    print "xxx1"
    c = bot.start()
    time.sleep(5)
    print "xxx2"
    # bot.stop()
    print "xxx3"
    time.sleep(5)
    print "xxx4"