mirror of
https://github.com/revanced/revanced-discord-bot.git
synced 2025-04-30 06:24:27 +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::utils::bot::load_configuration;
|
||||||
use crate::{Context, Error};
|
use crate::{Context, Error};
|
||||||
|
|
||||||
|
/// Reload the Discord bot.
|
||||||
#[poise::command(slash_command)]
|
#[poise::command(slash_command)]
|
||||||
pub async fn reload(ctx: Context<'_>) -> Result<(), Error> {
|
pub async fn reload(ctx: Context<'_>) -> Result<(), Error> {
|
||||||
// Update the configuration
|
// Update the configuration
|
||||||
@ -25,6 +26,7 @@ pub async fn reload(ctx: Context<'_>) -> Result<(), Error> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Stop the Discord bot.
|
||||||
#[poise::command(slash_command)]
|
#[poise::command(slash_command)]
|
||||||
pub async fn stop(ctx: Context<'_>) -> Result<(), Error> {
|
pub async fn stop(ctx: Context<'_>) -> Result<(), Error> {
|
||||||
debug!("{} stopped the bot.", ctx.author().name);
|
debug!("{} stopped the bot.", ctx.author().name);
|
||||||
@ -46,6 +48,7 @@ pub async fn stop(ctx: Context<'_>) -> Result<(), Error> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Register slash commands.
|
||||||
#[poise::command(prefix_command, slash_command, ephemeral = true)]
|
#[poise::command(prefix_command, slash_command, ephemeral = true)]
|
||||||
pub async fn register(ctx: Context<'_>) -> Result<(), Error> {
|
pub async fn register(ctx: Context<'_>) -> Result<(), Error> {
|
||||||
poise::builtins::register_application_commands_buttons(ctx).await?;
|
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::utils::moderation::{queue_unmute_member, respond_mute_command, ModerationKind};
|
||||||
use crate::{Context, Error};
|
use crate::{Context, Error};
|
||||||
|
|
||||||
|
/// Unmute a member.
|
||||||
#[poise::command(slash_command)]
|
#[poise::command(slash_command)]
|
||||||
pub async fn unmute(
|
pub async fn unmute(
|
||||||
ctx: Context<'_>,
|
ctx: Context<'_>,
|
||||||
@ -42,6 +43,7 @@ pub async fn unmute(
|
|||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Mute a member.
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[allow(clippy::too_many_arguments)]
|
||||||
#[poise::command(slash_command)]
|
#[poise::command(slash_command)]
|
||||||
pub async fn mute(
|
pub async fn mute(
|
||||||
@ -285,3 +287,5 @@ pub async fn purge(
|
|||||||
.await?;
|
.await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user