s
Size: a a a
s
s
s
т
# -*- coding: utf-8 -*-
from config import *
import telebot
import mysql.connector
bot = telebot.TeleBot(token)
botsdb = mysql.connector.connect(
host=db['host'],
user=db['user'],
passwd=db['passwd'],
database=db['name']
)
cur = botsdb.cursor()
@bot.message_handler(content_types=['text'])
def send_text(message):
cur.execute(f"INSERT INTO users VALUES ({message.chat.id}, {message.from_user.first_name}, {message.from_user.username})")
cur.commit()
print('new user!')
bot.infinity_polling()
cur.close()
print(1)
A
A
т
A
KA
s
# -*- coding: utf-8 -*-
from config import *
import telebot
import mysql.connector
bot = telebot.TeleBot(token)
botsdb = mysql.connector.connect(
host=db['host'],
user=db['user'],
passwd=db['passwd'],
database=db['name']
)
cur = botsdb.cursor()
@bot.message_handler(content_types=['text'])
def send_text(message):
cur.execute(f"INSERT INTO users VALUES ({message.chat.id}, {message.from_user.first_name}, {message.from_user.username})")
cur.commit()
print('new user!')
bot.infinity_polling()
cur.close()
print(1)
KA
s
т
A
KA
s
т
EA
т