mirror of
https://github.com/arthur-pbty/shadowbot.git
synced 2026-06-05 00:06:23 +02:00
3e69185296
- Implemented `handle_message_update` to log message edits. - Created role event handlers for role creation, update, and deletion. - Added voice state update handling to log channel changes. - Introduced a new `ready_event` handler to restore bot presence and enforce blacklist. - Updated `mod.rs` to include new event modules. - Enhanced `main.rs` for database connection and initialization. - Added comprehensive permission management in `permissions.rs`.
28 lines
987 B
Rust
28 lines
987 B
Rust
use serenity::model::prelude::*;
|
|
use serenity::prelude::*;
|
|
|
|
use crate::commands::botconfig_common;
|
|
|
|
pub async fn handle_playto(ctx: &Context, msg: &Message, args: &[&str]) {
|
|
botconfig_common::handle_activity(ctx, msg, "+playto", args).await;
|
|
}
|
|
|
|
pub struct PlaytoCommand;
|
|
pub static COMMAND_DESCRIPTOR: PlaytoCommand = PlaytoCommand;
|
|
|
|
impl crate::commands::command_contract::CommandSpec for PlaytoCommand {
|
|
fn metadata(&self) -> crate::commands::command_contract::CommandMetadata {
|
|
crate::commands::command_contract::CommandMetadata {
|
|
key: "playto",
|
|
command: "playto",
|
|
category: "profile",
|
|
params: "<texte[, ,texte2,...]>",
|
|
summary: "Definit une activite playing",
|
|
description: "Configure la rotation des messages d activite en mode playing.",
|
|
examples: &["+playto", "+po", "+help playto"],
|
|
alias_source_key: "playto",
|
|
default_aliases: &["ply"],
|
|
}
|
|
}
|
|
}
|