{"id":14483540,"url":"https://github.com/turt2live/matrix-bot-sdk-bot-template","last_synced_at":"2025-03-21T12:32:35.593Z","repository":{"id":42966762,"uuid":"222194274","full_name":"turt2live/matrix-bot-sdk-bot-template","owner":"turt2live","description":"A template for creating bots with matrix-bot-sdk","archived":false,"fork":false,"pushed_at":"2023-01-06T02:17:03.000Z","size":384,"stargazers_count":30,"open_issues_count":3,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T22:19:18.958Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/turt2live.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":"2019-11-17T03:57:01.000Z","updated_at":"2024-08-20T14:01:34.000Z","dependencies_parsed_at":"2023-02-05T02:45:16.533Z","dependency_job_id":null,"html_url":"https://github.com/turt2live/matrix-bot-sdk-bot-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turt2live%2Fmatrix-bot-sdk-bot-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turt2live%2Fmatrix-bot-sdk-bot-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turt2live%2Fmatrix-bot-sdk-bot-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/turt2live%2Fmatrix-bot-sdk-bot-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/turt2live","download_url":"https://codeload.github.com/turt2live/matrix-bot-sdk-bot-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815240,"owners_count":16885146,"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":[],"created_at":"2024-09-03T00:01:50.971Z","updated_at":"2024-10-28T10:09:16.939Z","avatar_url":"https://github.com/turt2live.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# `matrix-bot-sdk` Bot Templates\n\nA template for creating bots with [matrix-bot-sdk](https://www.npmjs.com/package/matrix-bot-sdk).\n\n## Projects using this template\n\n- [matrix-zammad](https://github.com/Half-Shot/matrix-zammad) by [Half-Shot](https://github.com/Half-Shot)\n\nWant your project listed? [Edit this doc](https://github.com/turt2live/matrix-bot-sdk-bot-template/edit/master/README.md).\n\n## Running / Building\n\nAfter clicking the 'use this template' button and cloning the repo, you'll need to install the dependencies\nand open an editor to get started. This assumes you have at least **NodeJS 14 or higher**.\n\n1. Replace this README with something useful.\n2. Update your project's details in `package.json`.\n3. Run `npm install` to get the dependencies.\n\nTo build it: `npm run build`.\n\nTo run it: `npm run start:dev`\n\nTo check the lint: `npm run lint`\n\nTo build the Docker image: `docker build -t your-bot:latest .`\n\nTo run the Docker image (after building): `docker run --rm -it -v $(pwd)/config:/bot/config your-bot:latest`\n*Note that this will require a `config/production.yaml` file to exist as the Docker container runs in production mode.*\n\n### Configuration\n\nThis template uses a package called `config` to manage configuration. The default configuration is offered\nas `config/default.yaml`. Copy/paste this to `config/development.yaml` and `config/production.yaml` and edit\nthem accordingly for your environment.\n\n## Project structure\n\nThis is a somewhat opinionated template that is runnable out of the box. The project is TypeScript with\na linter that matches the bot-sdk itself. All the good bits of the bot are under `src/`.\n\n### `src/index.ts`\n\nThis is where the bot's entry point is. Here you can see it reading the config, preparing the storage,\nand setting up other stuff that it'll use throughout its lifetime. Nothing in here should really require\nmodification - most of the bot is elsewhere.\n\n### `src/commands/handler.ts`\n\nWhen the bot receives a command (see `index.ts` for handoff) it gets processed here. The command structure\nis fairly manual, but a basic help menu and processing for a single command is there.\n\n### `src/commands/hello.ts`\n\nThis is the bot's `!bot hello` command. It doesn't do much, but it is an example.\n\n### `src/config.ts`\n\nThis is simply a typescript interface for your config so you can make use of types.\n\n### `lib/`\n\nThis is where the project's build files go. Not really much to see here.\n\n### `storage/`\n\nThis is the default storage location. Also not much to see here.\n\n## Help!\n\nCome visit us in [#matrix-bot-sdk:t2bot.io](https://matrix.to/#/#matrix-bot-sdk:t2bot.io) on Matrix if you're\nhaving trouble with this template.\n\n## Credits\n\nCredit to anoa's [matrix-nio template](https://github.com/anoadragon453/nio-template) for the README format.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturt2live%2Fmatrix-bot-sdk-bot-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturt2live%2Fmatrix-bot-sdk-bot-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturt2live%2Fmatrix-bot-sdk-bot-template/lists"}