Add documentation to gambling commands

This commit is contained in:
2024-10-11 20:51:59 -04:00
parent 4e08e25575
commit 0cd900c67a
3 changed files with 3 additions and 0 deletions

View File

@@ -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<serenity::User>) -> Result<(), Error> {
let user = user.as_ref().unwrap_or(ctx.author());

View File

@@ -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 {

View File

@@ -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;