1. Windows
2. Python 3.11.4
3
4. import time
import telebot
import webbrowser
bot = telebot.TeleBot("6931522895:AAHPPxmUQot3bt1Yh6XHYmI9Xv4wWttk3Cs")
@bot.message_handler(commands=['My steam', '/steam'])
def site():
webbrowser.open('https://steamcommunity.com/id/sexiegorka/')
@bot.message_handler(commands=['start'])
def main(message):
bot.send_message(message.chat.id, f'Привет, {message.from_user.first_name}', )
@bot.message_handler()
def info(message):
if message.text.lower() == 'привет':
bot.send_message(message.chat.id, f'Привет, {message.from_user.first_name}')
elif message.text.lower() == 'id':
bot.reply_to(message.chat.id, f'ID: {message.from_user.id}')
bot.polling(none_stop=True)
Итак, ошибку выдает при сообщении id в телеграмм боте
2. Python 3.11.4
3
Package Version
------------------ ----------
aiofiles 23.1.0
aiogram 3.1.1
aiohttp 3.8.6
aiosignal 1.3.1
annotated-types 0.6.0
async-timeout 4.0.3
pip 23.2.1
pydantic 2.3.0
pydantic_core 2.6.3
pyTelegramBotAPI 4.14.0
requests 2.31.0
setuptools 68.2.0
typing_extensions 4.7.1
urllib3 2.1.0
wheel 0.41.2
yarl 1.9.3
------------------ ----------
aiofiles 23.1.0
aiogram 3.1.1
aiohttp 3.8.6
aiosignal 1.3.1
annotated-types 0.6.0
async-timeout 4.0.3
pip 23.2.1
pydantic 2.3.0
pydantic_core 2.6.3
pyTelegramBotAPI 4.14.0
requests 2.31.0
setuptools 68.2.0
typing_extensions 4.7.1
urllib3 2.1.0
wheel 0.41.2
yarl 1.9.3
import telebot
import webbrowser
bot = telebot.TeleBot("6931522895:AAHPPxmUQot3bt1Yh6XHYmI9Xv4wWttk3Cs")
@bot.message_handler(commands=['My steam', '/steam'])
def site():
webbrowser.open('https://steamcommunity.com/id/sexiegorka/')
@bot.message_handler(commands=['start'])
def main(message):
bot.send_message(message.chat.id, f'Привет, {message.from_user.first_name}', )
@bot.message_handler()
def info(message):
if message.text.lower() == 'привет':
bot.send_message(message.chat.id, f'Привет, {message.from_user.first_name}')
elif message.text.lower() == 'id':
bot.reply_to(message.chat.id, f'ID: {message.from_user.id}')
bot.polling(none_stop=True)
Итак, ошибку выдает при сообщении id в телеграмм боте