{"id":20789636,"url":"https://github.com/botdio/botd","last_synced_at":"2025-05-05T19:45:33.369Z","repository":{"id":48171518,"uuid":"79764573","full_name":"botdio/botd","owner":"botdio","description":"play es6 code in slack","archived":false,"fork":false,"pushed_at":"2017-09-13T09:00:46.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-04T14:47:45.256Z","etag":null,"topics":["bot","es6","js","slack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botdio.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":"2017-01-23T02:59:58.000Z","updated_at":"2017-02-14T09:41:50.000Z","dependencies_parsed_at":"2022-07-26T17:45:45.898Z","dependency_job_id":null,"html_url":"https://github.com/botdio/botd","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/botdio%2Fbotd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botdio%2Fbotd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botdio%2Fbotd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botdio%2Fbotd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botdio","download_url":"https://codeload.github.com/botdio/botd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252564338,"owners_count":21768637,"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":["bot","es6","js","slack"],"created_at":"2024-11-17T15:25:19.746Z","updated_at":"2025-05-05T19:45:33.348Z","avatar_url":"https://github.com/botdio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BotD - Dev, Daemon and Automation, All in Slack.\n[![Build Status](https://travis-ci.org/botdio/botd.svg?branch=master)](https://travis-ci.org/botdio/botd)\n\nBotD start a daemon process in server side, and connect to your Slack. When code submit, the process will run it and output will be piped to your slack.\n\nWrite, run and debug nodejs code, when good enough, make a cron job to do automation. **The whole process is in slack.**\n\nBotD can be used to:\n\u003e Show team the runnable code, not words;    \n\u003e Share team the code and results;  \n\u003e \"Codepen\" for Team;  \n\u003e Operate in server side;  \n\u003e Hire talent by coding in slack.  \n\n## Demo: Hello, World\nThe follow gif shows how to invite BotD, write and execute the code, change and rerun the code:\n![hello,world](https://dev.botd.io/img/helloworld.gif)\n\n## Start \n```\nnode ./botd.js -t  \u003cslack bot token\u003e -n \u003cbot name, optional\u003e\n```\n\n## API\nFirst, git clone botd or `npm install botd`.\n\nSecond (optional), configure packages/libs for Shell script runtime:\n```\nvar Shell = require('botd').Shell;\nShell.addLibs(\"request\", \"superagent\"); // install superagent in your project\nShell.addLibs(\"format\", `${__dirname}/libs/format`); // `format` is your my own lib\n// then in your shell script, format and request are imported.\n```\n\nThird, start bot:\n```\nvar SlackBot = require('botd').SlackBot;\nvar Connector = require('botd').Connector;\nvar slack = new SlackBot(\"\u003cbot token\u003e\", \"\u003cbot name\u003e\");\nvar connector = new Connector(slack);\nslack.startBot();\n```\n\nYour bot should be shown in your slack im list!\n\n**Find FAQ in [FAQ]('./FAQ.md')**\n\n## Security Issues\nAs default, the running scripts are given secure enough packages (co, lodash etc).  \nMaybe you have added \"dangerous\" package( e.g. fs, child_process - crazy `rm -fr /` :(, even network), here are some suggestions:\n\u003e start botd running as a limited user (no root please).  \n\u003e use cgroup to limit the cpu privilege lower.  \n\n**YOU NEED UNDERSTAND WHAT ARE YOU DOING WHEN HOST BOTD IN YOUR PRODCUTION SERVER!**\n\n## Storage\nFor now, BotD support two storage types: file(default) and mongodb(optional).\n\n### stored by file\nDefault, use current dir where generate two json file (./channels.json \u0026 ./apps.json) as db file:\n```\nnode ./botd.js -t \u003cbot token\u003e -name \u003cbot name\u003e\n```\n\nUse specified dir and generate json file: /path/to/dir/channels.json and /path/to/dir/apps.json:\n```\nDB=file:/path/to/dir node ./botd.js -t \u003cbot token\u003e -name \u003cbot name\u003e\n```\nMake sure the dir exist and writable.\n\n### stored by mongodb\nSet the process env DB and start it:\n```\nDB=mongodb://localhost/botd node ./botd.js -t  \u003cslack bot token\u003e\n```\n\u003e SaaS use mongodb to store your data.\n\n### Samples\nFor app development, you can find a sample project [Hacker News Bot](https://github.com/botdio/hnbot),\nThere are several apps:\n\u003e **Follow** - to follow Hacker News keyword, items or users, make HN like a twitter.  \n\u003e **Checker** - check if a link is submitted in HN automatically.  \n\u003e **Agent** - after bind a HN id, get notification when someone comment/upvote my HN items, or when someone reply my comments.\n\nFor shell scripts, you can find example gist in https://gist.github.com/datalet/public\n\n### FAQ\nFind FAQ [here](./FAQ.md).\n\n## Contact\nWelcome to fire issues in github, or send pull request, or use [SaaS](https://botd.io) to make life easy.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotdio%2Fbotd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotdio%2Fbotd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotdio%2Fbotd/lists"}