mirror of
https://github.com/revanced/revanced-discord-bot.git
synced 2025-04-29 22:14:28 +02:00
feat: command descriptions
This commit is contained in:
parent
3f1d6af569
commit
8045e180e9
@ -3,6 +3,7 @@ use tracing::debug;
|
||||
use crate::utils::bot::load_configuration;
|
||||
use crate::{Context, Error};
|
||||
|
||||
/// Reload the Discord bot.
|
||||
#[poise::command(slash_command)]
|
||||
pub async fn reload(ctx: Context<'_>) -> Result<(), Error> {
|
||||
// Update the configuration
|
||||
@ -25,6 +26,7 @@ pub async fn reload(ctx: Context<'_>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Stop the Discord bot.
|
||||
#[poise::command(slash_command)]
|
||||
pub async fn stop(ctx: Context<'_>) -> Result<(), Error> {
|
||||
debug!("{} stopped the bot.", ctx.author().name);
|
||||
@ -46,6 +48,7 @@ pub async fn stop(ctx: Context<'_>) -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Register slash commands.
|
||||
#[poise::command(prefix_command, slash_command, ephemeral = true)]
|
||||
pub async fn register(ctx: Context<'_>) -> Result<(), Error> {
|
||||
poise::builtins::register_application_commands_buttons(ctx).await?;
|
||||
|
@ -8,6 +8,7 @@ use crate::db::model::Muted;
|
||||
use crate::utils::moderation::{queue_unmute_member, respond_mute_command, ModerationKind};
|
||||
use crate::{Context, Error};
|
||||
|
||||
/// Unmute a member.
|
||||
#[poise::command(slash_command)]
|
||||
pub async fn unmute(
|
||||
ctx: Context<'_>,
|
||||
@ -42,6 +43,7 @@ pub async fn unmute(
|
||||
.await
|
||||
}
|
||||
|
||||
/// Mute a member.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[poise::command(slash_command)]
|
||||
pub async fn mute(
|
||||
@ -285,3 +287,5 @@ pub async fn purge(
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user