Add /wttr command
This commit is contained in:
parent
cd15bd464d
commit
f592d7a8da
@ -92,6 +92,7 @@ help(){
|
||||
- /4c [board] - Get a random image from 4chan.
|
||||
- /lfy [query] - Let me look that up for you...
|
||||
- /ip [address] - Get information for an IP address.
|
||||
- /wttr [city] - Get the weather for a city.
|
||||
- /repo - Get my source code.
|
||||
|
||||
And a lot more to come!"
|
||||
@ -238,6 +239,12 @@ ip(){
|
||||
<b>Time:</b> $(TZ=${data[9]} date +'%H:%M %Z')"
|
||||
}
|
||||
|
||||
wttr(){
|
||||
args
|
||||
res=$(curl wttr.in/${args[0]}?format=3)
|
||||
sendmsg "$res"
|
||||
}
|
||||
|
||||
repo(){
|
||||
sendmsg "You can find my source code <a href=\"https://git.nixmagic.com/ghnou/konata\">here</a>."
|
||||
}
|
||||
@ -325,6 +332,7 @@ case "$cmd" in
|
||||
/4c@$bot*) 4c ;;
|
||||
/lfy@$bot*) lfy ;;
|
||||
/ip@$bot*) ip ;;
|
||||
/wttr@$bot*) wttr ;;
|
||||
/repo@$bot) repo ;;
|
||||
# Administrative
|
||||
/mp3@$bot*) mp3 ;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user