Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
imatpot committed Aug 31, 2024
1 parent 57cca8e commit ed4d3b4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 53 deletions.
File renamed without changes.
87 changes: 34 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

<p align="center">
<i>
Discord bot for managing <a href="https://warframe.fandom.com/wiki/Lunaro">Lunaro</a>
related ideas, targeted at the <a href="https://discord.gg/mUjGHEw">Lunaro Revival Discord Server</a>
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>
</i>
</p>

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

---

## Invite

This bot is readily available in the [Lunaro Revival Discord Server](https://discord.gg/mUjGHEw).

<a href="https://discord.gg/mUjGHEw" style="text-decoration: none">
<img src="https://img.shields.io/badge/Join-Lunaro%20Revival%20Server-%237289da?logo=discord&style=flat-square">
</a>

<br />

In case you want to add this bot to a different server, use the following link:

https://discord.com/api/oauth2/authorize?permissions=277293894656&scope=bot%20applications.commands&client_id=123

while inserting your client ID and keeping the scopes. Remember that the bot is
designed to *only be active in 1 server at a time.*

Please also make sure the bot's personal role is ranked *above* the managed playing role!

---

## Usage

This section explains all functionality which Lunaro Manager offers. Every
action will be replied to with a (selectively ephemeral) message.

### `❓ /help`

Guides to the Discord command explorer to discover all commands, and also links
to this GitHub section.
Guides to the Discord command explorer to discover all commands, and also links to this GitHub section.

### `🏓 /ping`

Check if Lunaro Manager is online and how long it took to receive the ping. This
value is calculated from the system time, and may thus be inaccurate.
Check if Lunaro Manager is online and how long it took to receive the ping.
This value is calculated from the system time, and may thus be inaccurate.

### `🟢 /play now`

Expand All @@ -74,23 +49,21 @@ Lists the number of members with the playing role.

### `💤 /tracking pause`

Disables Lunaro tracking for your account. This is useful because the Lunaro
tracker will otherwise override your manually set playing status.
Disables Lunaro tracking for your account.
This is useful because the Lunaro tracker will otherwise override your manually set playing status.

### `👁️ /tracking resume`

Enables Lunaro tracking for your account. Now you don't have to manually set
your playing status anymore.
Enables Lunaro tracking for your account.
Now you don't have to manually set your playing status anymore!

### `💡 /about`

Displays details about Lunaro Manager, including amount of actively tracked
members as well as stats and metadata about the bot.
Displays details about Lunaro Manager, including amount of actively tracked members as well as stats and metadata about the bot.

### `🤝 /contribute`

Displays a link to this GitHub page, encouraging the creation of issues and
pull requests.
Displays a link to this GitHub page, encouraging the creation of issues and pull requests.

---

Expand All @@ -100,31 +73,45 @@ pull requests.

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

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

4. Run the bot (see next sections)
4. Create a `.env` file following the schema in [.env.schema](.env.schema)

5. Run the bot using one of the methods below

## Running the bot

You can run the bot in several ways, depending on your preference and use case.

### Run locally

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

```sh
$ cargo run
```

### Run in Docker

You need to have [Docker](https://docker.com) installed.
This is the recommended way to run the bot in production.

```sh
$ docker compose up --build -d
```

### Run using Nix

If you have the [Nix](https://nixos.org) package manager installed, and enabled
[Flakes](https://nixos.wiki/wiki/Flakes), you have several ways to build and run
this bot.
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.

As a reminder:

- `nix build` builds the package binary
- `nix shell` builds the package binary and makes it available in your `$PATH`
- `nix run` builds the package binary and immediately executes it
- `nix shell` builds the package binary and makes it available in your shell

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

Expand All @@ -136,11 +123,5 @@ $ nix run
$ nix run github:imatpot/lunaro-manager

# run specific version using remote repository
$ nix run github:imatpot/lunaro-manager/2.0.0
```

### Run in Docker

```sh
$ docker-compose up --build -d
$ nix run github:imatpot/lunaro-manager/2.1.0
```

0 comments on commit ed4d3b4

Please sign in to comment.