~handlerug/handlebot

Multifunctional IRC bot for small communities
Normalise whitespace in URL previews
Upgrade dependencies
weather: allow running as another nickname

clone

read-only
https://git.sr.ht/~handlerug/handlebot
read/write
git@git.sr.ht:~handlerug/handlebot

You can also use your local clone with git send-email.

#handlebot

A lightweight multifunctional IRC bot for small communities. It uses a minimal amount of third-party dependencies.

#URL previewing

If an incoming message contains a URL, handlebot automatically extracts the most useful information from the link. It can be the webpage title or a short summary of YouTube video metadata, depending on the context.

     <user> https://sourcehut.org
<handlebot> ┗━ sourcehut - the hacker's forge
     <user> https://www.youtube.com/watch?v=dQw4w9WgXcQ
<handlebot> ┗━ Rick Astley - Never Gonna Give You Up (Official Music Video) [3m33s] 2009-10-25 (Rick Astley) 1,234,110,921 views HD
     <user> gemini://drewdevault.com/2021/10/05/Terminal-emulation-legacy.gmi
<handlebot> ┗━ The distant legacy of terminal emulators

#Commands

  • .weather [location] aka .w

    Fetches the current weather for the location. If the location is not specified, the last location that has been specified by the user is used.

         <user> .w tokyo
    <handlebot> Current weather in Tokyo, JP is light rain: 23°C; 80% humidity; 4.6m/s wind speed
    
  • .wolframalpha <query> aka .wa

    Executes a Wolfram|Alpha query.

         <user> .wa circumference of mars
    <handlebot> [Mars | equatorial circumference] 21339 km (kilometers)
    
  • .jisho <query>

    Runs a Jisho.org search.

         <user> .jisho semai
    <handlebot> 1: 狭い(せまい) Common (wanikani24) [I-adjective (keiyoushi): narrow, limited]; 2: 施米(せまい) Uncommon [Noun, Suru verb, Intransitive verb: rice given in charity]
    

#Migration from parabot

Run sqlite3 path/to/your.db and PRAGMA user_version = 1; to ensure that handlebot's migrations don't run on an already initialized database.

#License

handlebot is licensed under the GNU Affero General Public License:

Copyright (C) 2022 Umar Getagazov

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.