{"id":20643283,"url":"https://github.com/luminarys/kaguya","last_synced_at":"2025-08-21T00:30:38.769Z","repository":{"id":57511986,"uuid":"47735444","full_name":"Luminarys/Kaguya","owner":"Luminarys","description":"A small, powerful, and modular IRC bot","archived":false,"fork":false,"pushed_at":"2020-02-06T06:27:02.000Z","size":117,"stargazers_count":74,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-12T01:50:40.314Z","etag":null,"topics":["irc","irc-bot"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Luminarys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-10T03:28:58.000Z","updated_at":"2023-06-09T08:09:50.000Z","dependencies_parsed_at":"2022-08-31T06:40:53.601Z","dependency_job_id":null,"html_url":"https://github.com/Luminarys/Kaguya","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luminarys%2FKaguya","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luminarys%2FKaguya/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luminarys%2FKaguya/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luminarys%2FKaguya/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luminarys","download_url":"https://codeload.github.com/Luminarys/Kaguya/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230471175,"owners_count":18231193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["irc","irc-bot"],"created_at":"2024-11-16T16:12:02.056Z","updated_at":"2024-12-19T17:08:43.475Z","avatar_url":"https://github.com/Luminarys.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kaguya\n\n**A small but powerful IRC bot**\n\n## Installation\n\n1. Add kaguya to your list of dependencies in `mix.exs`:\n```elixir\ndef deps do\n  [{:kaguya, \"~\u003e x.y.z\"}]\nend\n```\n\n2. Run `mix deps.get`\n\n3. Ensure kaguya is started before your application:\n```elixir\ndef application do\n  [applications: [:kaguya]]\nend\n```\n\n4. Configure kaguya in config.exs:\n```elixir\nconfig :kaguya,\n  server: \"my.irc.server\",\n  port: 6666,\n  bot_name: \"kaguya\",\n  channels: [\"#kaguya\"]\n```\n\n## Usage\nBy default Kaguya won't do much. This is an example of a module which will\nperform a few simple commands:\n```elixir\ndefmodule Kaguya.Module.Simple do\n  use Kaguya.Module, \"simple\"\n\n  handle \"PRIVMSG\" do\n    match [\"!ping\", \"!p\"], :pingHandler\n    match \"hi\", :hiHandler\n    match \"!say ~message\", :sayHandler\n  end\n\n  defh pingHandler, do: reply \"pong!\"\n  defh hiHandler(%{user: %{nick: nick}}), do: reply \"hi #{nick}!\"\n  defh sayHandler(%{\"message\" =\u003e response}), do: reply response\nend\n```\n\nThis module defines four commands to be handled:\n* `!ping` and `!p` are aliased to the same handler, which has the bot respond `pong!`.\n* `hi` will cause the bot to reply saying \"hi\" with the persons' nick\n* `!say [some message]` will have the bot echo the message the user gave.\n\nThe handler macro can accept up to two different parameters, a map which destructures a message struct, and a map which destructures a match from a command.\n\nYou can find a more full featured example in `example/basic.ex`.\n\n## Configuration\n\n* `server` - Hostname or IP address to connect with. String.\n* `server_ip_type` - IP version to use. Can be either `inet` or `inet6`\n* `port` - Port to connect on. Integer.\n* `bot_name` - Name to use by bot. String.\n* `channels` - List of channels to join. Format: `#\u003cname\u003e`. List\n* `help_cmd` - Specifies command to act as help. Defaults to `.help`. String\n* `use_ssl` - Specifies whether to use SSL or not. Boolean\n* `reconnect_interval` - Interval for reconnection in ms. Integer. Not used.\n* `server_timeout` - Timeout(ms) that determines when server gets disconnected. Integer.\n                     When omitted Kaguya does not verifies connectivity with server.\n                     It is recommended to set at least few minutes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluminarys%2Fkaguya","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluminarys%2Fkaguya","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluminarys%2Fkaguya/lists"}