diff --git a/.env.example b/.env.schema similarity index 100% rename from .env.example rename to .env.schema diff --git a/README.md b/README.md index 9446825..2401833 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,7 @@

- Discord bot for managing Lunaro - related ideas, targeted at the Lunaro Revival Discord Server + Discord bot for managing everything Lunaro for the Academia Lunaris Discord Server

@@ -18,45 +17,21 @@ + + +

---- - -## Invite - -This bot is readily available in the [Lunaro Revival Discord Server](https://discord.gg/mUjGHEw). - - - - - -
- -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` @@ -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. --- @@ -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. @@ -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 ```