-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (21 loc) · 709 Bytes
/
main.py
File metadata and controls
26 lines (21 loc) · 709 Bytes
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
# coding=utf-8
from botRequests import *
import os
import telebot
from modularfunctions.hello_function import helloFunction
from modularfunctions.add_password_function import addPasswordFunction
from modularfunctions.input_command_function import inputCommandFunction
password = None
bot = telebot.TeleBot(token)
os.chdir(os.path.abspath('/home'))
@bot.message_handler(commands = ['start'])
def hello(message):
helloFunction(message)
@bot.message_handler(commands =["password"])
def addPassword(message):
global password
password = addPasswordFunction(message)
@bot.message_handler(func = lambda mess: True)
def inputCommand(message):
inputCommandFunction(message, password)
bot.polling()