pygbot - simple irc bot in python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

9 lines
318 B

import requests
def getweather(bot, channel, message):
try:
location = message.split()[1:]
page = requests.get(f"http://wttr.in/{'+'.join(location)}?format=%l+|+%t+|+%C+|+Humidity:+%h+|+Wind:+%w")
bot.send(channel, page.text)
except:
bot.send(channel, "Failed to get weather")