Skip to content

Commit

Permalink
commands: Add doc comments
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Maddock <[email protected]>
  • Loading branch information
EbonJaeger committed Jul 23, 2024
1 parent 22bb846 commit b48cd39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/discord/commands/minecraft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use serenity::{
use thiserror::Error;
use tokio::time::sleep;

/// Prints out an embed listing the currently-supported commands.
pub async fn help(ctx: Context, command: CommandInteraction) -> Result<(), Error> {
let embed = CreateEmbed::new()
.title("Dolphin Help")
Expand All @@ -40,6 +41,11 @@ pub async fn help(ctx: Context, command: CommandInteraction) -> Result<(), Error
Ok(())
}

/// Lists all players currently on the Minecraft server.
///
/// This works by calling the Minecraft `list` command via RCON,
/// and listening for the response. The response is parsed to get
/// the online player count, as well as their names.
pub async fn list(ctx: Context, command: CommandInteraction) -> Result<(), Error> {
let config = ctx
.data
Expand Down

0 comments on commit b48cd39

Please sign in to comment.