{"id":15490100,"url":"https://github.com/karhal/gerardbot","last_synced_at":"2025-10-12T03:31:40.888Z","repository":{"id":85968626,"uuid":"59656032","full_name":"Karhal/gerardbot","owner":"Karhal","description":"Simple Slack bot module handler","archived":true,"fork":false,"pushed_at":"2023-12-15T11:55:05.000Z","size":360,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-29T09:36:54.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Karhal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-25T11:01:44.000Z","updated_at":"2024-08-08T13:27:56.000Z","dependencies_parsed_at":"2023-05-27T14:45:49.847Z","dependency_job_id":null,"html_url":"https://github.com/Karhal/gerardbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Karhal/gerardbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karhal%2Fgerardbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karhal%2Fgerardbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karhal%2Fgerardbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karhal%2Fgerardbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Karhal","download_url":"https://codeload.github.com/Karhal/gerardbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Karhal%2Fgerardbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010148,"owners_count":26084692,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-02T07:09:19.382Z","updated_at":"2025-10-12T03:31:40.585Z","avatar_url":"https://github.com/Karhal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**GérardBot!**\n===================\n\nHey! This is a very simple Slack bot based on the excellent [slackbots](https://www.npmjs.com/package/slackbots \"slackbots\") library allowing you to easily add your own services.\n\n----------\n\n\nInstallation\n-------------\n1. Download and install the latest Node.js version\n2. Clone the repository **git clone git@github.com:Karhal/gerardbot.git**\n3. Enter the repository cd ~/gerardbot\n4. Install: npm install\n\n#### \u003ci class=\"icon-file\"\u003e\u003c/i\u003e Configuration\nYou'll need a Slack token (https://my.slack.com/services/new/bot) and a bot name. Please check the config.example.js file.\n\n\n#### \u003ci class=\"icon-file\"\u003e\u003c/i\u003e Create a module\n\nThe real advantage of Gérardbot is that you can easily create your own modules which will be plugged to you original bot. \nLet's create a simple HelloWorld module as an example :\n\n    \n\nlib/modules/helloworld/helloworld.js\n\n    \n    var util = require('util');\n    var config = require('./config.js');\n    var Module = require('./../../../bin/module.js');\n    \n    var Helloworld = function Constructor(bot) {\n        this.bot = bot;\n        this.data = null;\n        this.keyWords = config.keywords;\n    };\n    util.inherits(Helloworld, Module);\n    \n    Helloworld.prototype.getAnswer = function() {\n          this.bot.postMessage(this.data.channel, 'Hello world!', this.bot.params);\n    };\n\n----------\n   lib/modules/helloworld/config.js\n    \n    var config = {};   \n    config.keywords = ['hello', 'bonjour'];   \n    module.exports = config;\n\n#### That's it !\n\n\nUsage\n-------------\n1. Run your application : node bin/bot.js\n2. Connect to your slack\n3. Invite your bot in the channel you want: /invite @yourbot\n4. Say @yourbot hello ! \n5. Enjoy\n\n\nImgur Module example\n-------------\nlib/modules/imgur/config.js\n\n    var config = {};\n\n    config.keywords = ['montre moi des', 'sors nous une photo de'];\n    config.imgurAuth = 'Client-ID xxxxxxxxxxx';\n\n    config.subs = {\n        'chiens': 'dogs',\n        'chat': 'cats',\n        'paresseux': 'sloths',\n    }\n\n    module.exports = config;\n\n\n![Imgur Module example](documents/img/imgur/imgur_example.png)\n\n\nRestaurant Module example\n-------------\nlib/modules/restaurant/config.js\n\n    var config = {};\n\n    config.myplace = '50.654809,3.071461';\n    config.googlemaps_api_key = 'xxxxxxxxxxxxxxx';\n    config.radius = 1000;\n    config.keywords = ['on mange ou', 'on mange où'];\n    module.exports = config;\n\n![Imgur Module example](documents/img/restaurant/restaurant_example.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarhal%2Fgerardbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarhal%2Fgerardbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarhal%2Fgerardbot/lists"}