|
1 | | -# beet-bot |
2 | | - |
3 | | -[](https://github.com/mcbeet/beet-bot/actions) |
4 | | -[](https://www.npmjs.com/package/beet-bot) |
5 | | -[](https://discord.gg/98MdSGMm8j) |
6 | | - |
7 | | -> Packages for the beet bot. |
8 | | -
|
9 | | -Click the following invite link to add the bot to your own server: |
10 | | - |
11 | | -- https://discord.com/api/oauth2/authorize?client_id=980644229984419932&permissions=0&scope=bot%20applications.commands |
12 | | - |
13 | | -## Installation |
14 | | - |
15 | | -You can install the beet bot via `npm`. |
16 | | - |
17 | | -```bash |
18 | | -$ npm install beet-bot |
19 | | -``` |
20 | | - |
21 | | -To run your own instance of the bot use the `beet-bot` command or simply run it with `npx` to install it automatically. |
22 | | - |
23 | | -```bash |
24 | | -$ npx beet-bot --clientId=... --token=... |
25 | | -``` |
26 | | - |
27 | | -## Usage |
28 | | - |
29 | | -You can provide credentials through command-line options `--clientId/--token` or by using environment variables `BEET_BOT_CLIENT_ID/BEET_BOT_TOKEN`. The bot will load the `.env` file in the working directory. The `--config` option lets you specify a json file in which you can define runner environments. |
30 | | - |
31 | | -```bash |
32 | | -$ beet-bot --config bot.json |
33 | | -``` |
34 | | - |
35 | | -> Check out the sample [bot.json](bot.json). |
36 | | -
|
37 | | -## Contributing |
38 | | - |
39 | | -This is a monorepo managed with [`pnpm`](https://pnpm.io/). If you don't have it installed already check out the [standalone script](https://pnpm.io/installation) for your platform or get it via [Corepack](https://github.com/nodejs/corepack) using `corepack enable`. |
40 | | - |
41 | | -```bash |
42 | | -$ pnpm install |
43 | | -``` |
44 | | - |
45 | | -Set up packages for local development by running `pnpm -r stub`, and then launch the bot with the required credentials. |
46 | | - |
47 | | -```bash |
48 | | -$ pnpm dev --clientId=... --token=... |
49 | | -``` |
50 | | - |
51 | | -You can also create a `.env` file at the root of the repository. |
52 | | - |
53 | | -```env |
54 | | -BEET_BOT_CLIENT_ID=... |
55 | | -BEET_BOT_TOKEN=... |
56 | | -``` |
57 | | - |
58 | | -To build for production use the `pnpm -r build` command. Note that this overwrites package stubs so you will need to run `pnpm -r stub` again if you want to resume developing locally. |
59 | | - |
60 | | -```bash |
61 | | -$ pnpm -r build |
62 | | -$ pnpm start --clientId=... --token=... |
63 | | -``` |
64 | | - |
65 | | -The project must type-check and `eslint` shouldn't report any error. |
66 | | - |
67 | | -```bash |
68 | | -$ pnpm -r lint |
69 | | -``` |
70 | | - |
71 | | ---- |
72 | | - |
73 | | -License - [MIT](https://github.com/mcbeet/beet-bot/blob/main/LICENSE) |
| 1 | +# beet-bot |
| 2 | + |
| 3 | +[](https://github.com/mcbeet/beet-bot/actions) |
| 4 | +[](https://www.npmjs.com/package/beet-bot) |
| 5 | +[](https://discord.gg/98MdSGMm8j) |
| 6 | + |
| 7 | +> Packages for the beet bot. |
| 8 | +
|
| 9 | +Click the following link to add the bot to your own server: |
| 10 | + |
| 11 | +- https://discord.com/oauth2/authorize?client_id=980644229984419932 |
| 12 | + |
| 13 | +## Installation |
| 14 | + |
| 15 | +You can install the beet bot via `npm`. |
| 16 | + |
| 17 | +```bash |
| 18 | +$ npm install beet-bot |
| 19 | +``` |
| 20 | + |
| 21 | +To run your own instance of the bot use the `beet-bot` command or simply run it with `npx` to install it automatically. |
| 22 | + |
| 23 | +```bash |
| 24 | +$ npx beet-bot --clientId=... --token=... |
| 25 | +``` |
| 26 | + |
| 27 | +## Usage |
| 28 | + |
| 29 | +You can provide credentials through command-line options `--clientId/--token` or by using environment variables `BEET_BOT_CLIENT_ID/BEET_BOT_TOKEN`. The bot will load the `.env` file in the working directory. The `--config` option lets you specify a json file in which you can define runner environments. |
| 30 | + |
| 31 | +```bash |
| 32 | +$ beet-bot --config bot.json |
| 33 | +``` |
| 34 | + |
| 35 | +> Check out the sample [bot.json](bot.json). |
| 36 | +
|
| 37 | +## Contributing |
| 38 | + |
| 39 | +This is a monorepo managed with [`pnpm`](https://pnpm.io/). If you don't have it installed already check out the [standalone script](https://pnpm.io/installation) for your platform or get it via [Corepack](https://github.com/nodejs/corepack) using `corepack enable`. |
| 40 | + |
| 41 | +```bash |
| 42 | +$ pnpm install |
| 43 | +``` |
| 44 | + |
| 45 | +Set up packages for local development by running `pnpm -r stub`, and then launch the bot with the required credentials. |
| 46 | + |
| 47 | +```bash |
| 48 | +$ pnpm dev --clientId=... --token=... |
| 49 | +``` |
| 50 | + |
| 51 | +You can also create a `.env` file at the root of the repository. |
| 52 | + |
| 53 | +```env |
| 54 | +BEET_BOT_CLIENT_ID=... |
| 55 | +BEET_BOT_TOKEN=... |
| 56 | +``` |
| 57 | + |
| 58 | +To build for production use the `pnpm -r build` command. Note that this overwrites package stubs so you will need to run `pnpm -r stub` again if you want to resume developing locally. |
| 59 | + |
| 60 | +```bash |
| 61 | +$ pnpm -r build |
| 62 | +$ pnpm start --clientId=... --token=... |
| 63 | +``` |
| 64 | + |
| 65 | +The project must type-check and `eslint` shouldn't report any error. |
| 66 | + |
| 67 | +```bash |
| 68 | +$ pnpm -r lint |
| 69 | +``` |
| 70 | + |
| 71 | +--- |
| 72 | + |
| 73 | +License - [MIT](https://github.com/mcbeet/beet-bot/blob/main/LICENSE) |
0 commit comments