Skip to content

Commit c8cb457

Browse files
committed
chore: update documentation
1 parent 827a99d commit c8cb457

File tree

3 files changed

+51
-60
lines changed

3 files changed

+51
-60
lines changed

.env.example .env.schema

File renamed without changes.

README.md

+49-58
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
<p align="center">
88
<i>
9-
Discord bot for managing <a href="https://warframe.fandom.com/wiki/Lunaro">Lunaro</a>
10-
related ideas, targeted at the <a href="https://discord.gg/mUjGHEw">Lunaro Revival Discord Server</a>
9+
Discord bot for managing everything <a href="https://warframe.fandom.com/wiki/Lunaro">Lunaro</a> for the <a href="https://discord.gg/rFBzmpEQxc">Academia Lunaris Discord Server</a>
1110
</i>
1211
</p>
1312

@@ -18,113 +17,111 @@
1817
<a href="LICENSE.md" style="text-decoration: none">
1918
<img src="https://img.shields.io/github/license/imatpot/lunaro-manager?color=blue&style=flat-square">
2019
</a>
20+
<a href="https://discord.gg/rFBzmpEQxc" style="text-decoration: none">
21+
<img src="https://img.shields.io/badge/Join-Academia%20Lunaris-%237289da?logo=discord&style=flat-square">
22+
</a>
2123
</p>
2224

23-
---
24-
25-
## Invite
26-
27-
This bot is readily available in the [Lunaro Revival Discord Server](https://discord.gg/mUjGHEw).
28-
29-
<a href="https://discord.gg/mUjGHEw" style="text-decoration: none">
30-
<img src="https://img.shields.io/badge/Join-Lunaro%20Revival%20Server-%237289da?logo=discord&style=flat-square">
31-
</a>
32-
33-
<br />
34-
35-
In case you want to add this bot to a different server, use the following link:
36-
37-
https://discord.com/api/oauth2/authorize?permissions=277293894656&scope=bot%20applications.commands&client_id=123
38-
39-
while inserting your client ID and keeping the scopes. Remember that the bot is
40-
designed to *only be active in 1 server at a time.*
41-
42-
Please also make sure the bot's personal role is ranked *above* the managed playing role!
43-
44-
---
45-
4625
## Usage
4726

48-
This section explains all functionality which Lunaro Manager offers. Every
49-
action will be replied to with a (selectively ephemeral) message.
27+
> [!NOTE]
28+
> Lunaro tracking is **enabled** for every server member by default.
29+
>
30+
> Lunaro Manager will react to changes in your Discord rich presence.
31+
> It will automatically set your playing status to "Playing Lunaro" when you are playing Lunaro, and remove it with a small delay when you are not.
32+
>
33+
> You can disable Lunaro tracking for your account at any time using the [`/tracking pause`](#-tracking-pause) command.
5034
5135
### `❓ /help`
5236

53-
Guides to the Discord command explorer to discover all commands, and also links
54-
to this GitHub section.
37+
Guides to the Discord command explorer to discover all commands, and also links to this GitHub section.
5538

5639
### `🏓 /ping`
5740

58-
Check if Lunaro Manager is online and how long it took to receive the ping. This
59-
value is calculated from the system time, and may thus be inaccurate.
41+
Check if Lunaro Manager is online and how long it took to receive the ping.
42+
This value is calculated from the system time, and may thus be inaccurate.
6043

6144
### `🟢 /play now`
6245

63-
Adds the configured playing role to your profile.
46+
Adds the playing role to your profile.
6447
You can optionally disable Lunaro tracking for your account at the same time.
6548

6649
### `⭕ /play later`
6750

68-
Removes the configured playing role from your profile.
51+
Removes the playing role from your profile.
6952
You can optionally re-enable Lunaro tracking for your account at the same time.
7053

7154
### `👀 /play info`
7255

73-
Lists the number of members with the playing role.
56+
Lists the number of members playing Lunaro.
7457

7558
### `💤 /tracking pause`
7659

77-
Disables Lunaro tracking for your account. This is useful because the Lunaro
78-
tracker will otherwise override your manually set playing status.
60+
Disables Lunaro tracking for your account.
61+
62+
The bot will no longer react to changes in your Discord rich presence.
63+
This is useful because the Lunaro tracker will otherwise override your manually set playing status.
7964

8065
### `👁️ /tracking resume`
8166

82-
Enables Lunaro tracking for your account. Now you don't have to manually set
83-
your playing status anymore.
67+
Enables Lunaro tracking for your account.
68+
69+
The bot will now react to changes in your Discord rich presence.
70+
Now you don't have to manually set your playing status anymore, as the bot will automatically check if you are playing Lunaro.
8471

8572
### `💡 /about`
8673

87-
Displays details about Lunaro Manager, including amount of actively tracked
88-
members as well as stats and metadata about the bot.
74+
Displays details about Lunaro Manager, including amount of actively tracked members as well as stats and metadata about the bot.
8975

9076
### `🤝 /contribute`
9177

92-
Displays a link to this GitHub page, encouraging the creation of issues and
93-
pull requests.
94-
95-
---
78+
Displays a link to this GitHub page, encouraging the creation of issues and pull requests.
9679

97-
## Setup
80+
## Development setup
9881

9982
1. Create a bot on https://discord.com/developers
10083

10184
2. Enable `PRESENCE` & `SERVER MEMBERS` intents in the Bot section
10285

103-
3. Create a `.env` file following the example of [.env.example](.env.example)
86+
3. Invite the bot to your server, giving the following permissions:
87+
- Manage Roles
88+
- Send Messages
10489

105-
4. Run the bot (see next sections)
90+
4. Create a `.env` file following the schema in [.env.schema](.env.schema)
91+
92+
5. Run the bot using one of the methods below
10693

10794
## Running the bot
10895

96+
You can run the bot in several ways, depending on your preference and use case.
97+
10998
### Run locally
11099

111100
You need to have [Rust](https://rust-lang.org) installed.
101+
This is the recommended way to run the bot during development.
112102

113103
```sh
114104
$ cargo run
115105
```
116106

107+
### Run in Docker
108+
109+
You need to have [Docker](https://docker.com) installed.
110+
This is the recommended way to run the bot in production.
111+
112+
```sh
113+
$ docker compose up --build -d
114+
```
115+
117116
### Run using Nix
118117

119-
If you have the [Nix](https://nixos.org) package manager installed, and enabled
120-
[Flakes](https://nixos.wiki/wiki/Flakes), you have several ways to build and run
121-
this bot.
118+
If you have the [Nix](https://nixos.org) package manager installed with [Flakes](https://nixos.wiki/wiki/Flakes) enabled, you have several ways to build and run this bot.
122119

123120
As a reminder:
124121

125122
- `nix build` builds the package binary
123+
- `nix shell` builds the package binary and makes it available in your `$PATH`
126124
- `nix run` builds the package binary and immediately executes it
127-
- `nix shell` builds the package binary and makes it available in your shell
128125

129126
I will use `nix run` as the example, but you can use any of the above.
130127

@@ -136,11 +133,5 @@ $ nix run
136133
$ nix run github:imatpot/lunaro-manager
137134

138135
# run specific version using remote repository
139-
$ nix run github:imatpot/lunaro-manager/2.0.0
140-
```
141-
142-
### Run in Docker
143-
144-
```sh
145-
$ docker-compose up --build -d
136+
$ nix run github:imatpot/lunaro-manager/2.1.0
146137
```

src/commands/tracking.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub async fn run(_context: PoiseContext<'_>) -> Result<(), Error> {
1212
Ok(())
1313
}
1414

15-
/// 💤 Pause Lunaro tracking on your account
15+
/// 💤 Pause Lunaro tracking for your account
1616
#[command(slash_command)]
1717
async fn pause(context: PoiseContext<'_>) -> Result<(), Error> {
1818
let member = context.author();
@@ -30,7 +30,7 @@ async fn pause(context: PoiseContext<'_>) -> Result<(), Error> {
3030
Ok(())
3131
}
3232

33-
/// 👁️ Resume Lunaro tracking on your account
33+
/// 👁️ Resume Lunaro tracking for your account
3434
#[command(slash_command)]
3535
async fn resume(context: PoiseContext<'_>) -> Result<(), Error> {
3636
let member = context.author();

0 commit comments

Comments
 (0)