Skip to content

Commit 491af98

Browse files
committed
Some polish for README, cargo fixes
1 parent ef83397 commit 491af98

File tree

4 files changed

+33
-4
lines changed

4 files changed

+33
-4
lines changed

.env.example

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# See https://docs.rs/env_logger
2-
RUST_LOG=info
2+
RUST_LOG=error
33

44
DISCORD_TOKEN=
55
BACKGROUND_CAT_PREFIX=-

Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ members = [
44
"apps/discord-cat",
55
"libs/background-cat",
66
]
7+
8+
[profile.release]
9+
lto = true

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,32 @@
44
I made this bot because it was brought to my attention that other discords also had similar bots. Dissatisfied with the other ones, I made yet another one.
55

66
[![xkcd "Standards" comic](https://imgs.xkcd.com/comics/standards.png)](https://xkcd.com/927/)
7+
8+
## Development
9+
10+
- Build the code: `cargo build --bin discord-cat`
11+
- Copy `.env.example` to `target/debug/`
12+
- Customize `target/debug/.env` and include your Discord token in it, like this:
13+
```
14+
# See https://docs.rs/env_logger
15+
RUST_LOG=error
16+
17+
DISCORD_TOKEN=AAa0AAa0AAAaAaa...
18+
BACKGROUND_CAT_PREFIX=-
19+
```
20+
- Run the bot: `cargo run -p discord-cat`
21+
22+
## Running in production
23+
24+
- Copy `.env.example` to `.env`
25+
- Customize `.env` and include your Discord token in it, like this:
26+
```
27+
# See https://docs.rs/env_logger
28+
RUST_LOG=error
29+
30+
DISCORD_TOKEN=AAa0AAa0AAAaAaa...
31+
BACKGROUND_CAT_PREFIX=-
32+
```
33+
34+
- Build the images: `docker-compose build`
35+
- Start the service: `docker-compose start`

libs/background-cat/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ lazy_static = "1.4.0"
1111
log = { version = "0.4.16", features = ["release_max_level_info"] }
1212
env_logger = "0.9.0"
1313
indoc = "1.0.6"
14-
15-
[profile.release]
16-
lto = true

0 commit comments

Comments
 (0)