from pyowm import OWM
from pyowm.utils import config
from pyowm.utils import timestamps
import telebot
owm = OWM('токенмой')
mgr = owm.weather_manager()
bot = telebot.TeleBot('токен')
@bot.message_handler(content_types=['text'])
def send_echo(message):
observation = mgr.weather_at_place( message.text )
w = observation.weather
temp = w.temperature('celsius')["temp"]
answer = 'В городе ' + message.text + ' сейчас ' + w.detailed_status + "\n"
answer += 'Температура сейчас в городе ' + str(temp) + "\n\n"
bot.send_message(message.chat.id, answer)
bot.polling( none_stop = True)