Merge branch 'dev'

This commit is contained in:
2025-02-21 15:34:12 -05:00
5 changed files with 11 additions and 4 deletions

View File

@@ -37,9 +37,10 @@ async fn autocomplete_shop<'a>(
#[poise::command(slash_command, prefix_command)]
pub async fn buy(ctx: Context<'_>,
count: Option<i32>,
#[autocomplete = "autocomplete_shop"]
item: String,
count: Option<i32>) -> Result<(), Error>
#[rest]
item: String) -> Result<(), Error>
{
let count = count.unwrap_or(1);

View File

@@ -8,6 +8,7 @@ pub async fn wager(
ctx: Context<'_>,
amount: String,
#[autocomplete = "super::autocomplete_inventory"]
#[rest]
item: Option<String>) -> Result<(), Error>
{
let mut tx = ctx.data().database.begin().await?;

View File

@@ -15,6 +15,7 @@ use crate::common::{Data, Error, Context};
#[poise::command(prefix_command, slash_command)]
async fn help(ctx: Context<'_>,
#[description = "Specific command to get help with"]
#[rest]
command: Option<String>) -> Result<(), Error>
{
poise::builtins::help(ctx, command.as_deref(), poise::builtins::HelpConfiguration::default()).await?;

View File

@@ -61,7 +61,11 @@ async fn autocomplete_colors<'a>(
/// Change the color of your personal role
#[poise::command(slash_command, prefix_command)]
pub async fn color(ctx: Context<'_>, #[autocomplete = "autocomplete_colors"] color: String) -> Result<(), Error> {
pub async fn color(ctx: Context<'_>,
#[autocomplete = "autocomplete_colors"]
#[rest]
color: String) -> Result<(), Error>
{
let color = if let Some(named) = COLORS.get(color.as_str()) {
named.clone()
} else {

View File

@@ -5,7 +5,7 @@ use poise::serenity_prelude::EditRole;
/// Change the name of your personal role
#[poise::command(slash_command, prefix_command)]
pub async fn name(ctx: Context<'_>, name: String) -> Result<(), Error> {
pub async fn name(ctx: Context<'_>, #[rest] name: String) -> Result<(), Error> {
let guild = if let Some(guild) = ctx.guild_id() {
guild
} else {