From 0cd900c67aa480b6be78fc84b82e1844e87b3abc Mon Sep 17 00:00:00 2001 From: minneelyyyy Date: Fri, 11 Oct 2024 20:51:59 -0400 Subject: [PATCH] Add documentation to gambling commands --- src/commands/gambling/balance.rs | 1 + src/commands/gambling/give.rs | 1 + src/commands/gambling/wager.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/commands/gambling/balance.rs b/src/commands/gambling/balance.rs index 370b9d7..92a4a66 100644 --- a/src/commands/gambling/balance.rs +++ b/src/commands/gambling/balance.rs @@ -2,6 +2,7 @@ use super::get_user_wealth_mut; use crate::common::{Context, Error}; use poise::serenity_prelude as serenity; +/// Tells you what your or someone else's balance is #[poise::command(slash_command, prefix_command)] pub async fn balance(ctx: Context<'_>, user: Option) -> Result<(), Error> { let user = user.as_ref().unwrap_or(ctx.author()); diff --git a/src/commands/gambling/give.rs b/src/commands/gambling/give.rs index 8b3283a..63cc1d3 100644 --- a/src/commands/gambling/give.rs +++ b/src/commands/gambling/give.rs @@ -2,6 +2,7 @@ use crate::{Context, Error}; use super::get_user_wealth_mut; use poise::serenity_prelude as serenity; +/// Generously donate your tokens to someone else #[poise::command(slash_command, prefix_command)] pub async fn give(ctx: Context<'_>, user: serenity::User, amount: usize) -> Result<(), Error> { if user.bot { diff --git a/src/commands/gambling/wager.rs b/src/commands/gambling/wager.rs index 4454571..1c532a6 100644 --- a/src/commands/gambling/wager.rs +++ b/src/commands/gambling/wager.rs @@ -1,6 +1,7 @@ use crate::common::{Context, Error}; use super::get_user_wealth_mut; +/// Put forward an amount of tokens to either lose or earn #[poise::command(slash_command, prefix_command)] pub async fn wager(ctx: Context<'_>, amount: usize) -> Result<(), Error> { let mut users = ctx.data().users.lock().await;