mirror of
https://github.com/arthur-pbty/shadowbot.git
synced 2026-06-12 15:57:03 +02:00
Refactor profile commands to improve status handling and embed responses
- Updated `handle_idle`, `handle_invisible`, `handle_online`, `handle_listen`, `handle_playto`, `handle_stream`, `handle_watch`, and `handle_remove_activity` functions to use a unified approach for setting bot status and sending embed messages. - Removed dependency on `botconfig_common` and replaced it with direct database interactions for status management. - Added new helper functions for logging and moderation channel management. - Introduced permission handling improvements in `set` command with better error messages and user feedback. - Created new utility functions for parsing user and role IDs, ensuring better command access control.
This commit is contained in:
@@ -150,3 +150,21 @@ pub async fn handle_ticket_add(ctx: &Context, msg: &Message, args: &[&str]) {
|
||||
pub async fn handle_ticket_remove(ctx: &Context, msg: &Message, args: &[&str]) {
|
||||
let _ = ticket_member_update(ctx, msg, args, false).await;
|
||||
}
|
||||
|
||||
pub struct TicketMemberCommand;
|
||||
pub static COMMAND_DESCRIPTOR: TicketMemberCommand = TicketMemberCommand;
|
||||
|
||||
impl crate::commands::command_contract::CommandSpec for TicketMemberCommand {
|
||||
fn metadata(&self) -> crate::commands::command_contract::CommandMetadata {
|
||||
crate::commands::command_contract::CommandMetadata {
|
||||
name: "add",
|
||||
category: "admin",
|
||||
params: "<@membre/ID>",
|
||||
summary: "Ajoute un membre au ticket",
|
||||
description: "Ajoute un membre supplementaire au ticket courant via +add.",
|
||||
examples: &["+add @User", "+help add"],
|
||||
default_aliases: &[],
|
||||
default_permission: 2,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user