bot prefix

This commit is contained in:
2025-12-16 16:59:47 +05:30
parent 4063d03231
commit b22a1c6fee

View File

@@ -4,7 +4,7 @@ mod commands;
use dotenvy::dotenv;
use poise::{serenity_prelude as serenity, Framework, FrameworkOptions};
use ::serenity::all::GatewayIntents;
use std::env;
use std::{env, sync::Arc};
type Error = anyhow::Error;
use tracing_subscriber::{FmtSubscriber, EnvFilter};
@@ -31,6 +31,14 @@ async fn main() -> Result<(), Error> {
let framework = Framework::builder()
.options(FrameworkOptions::<Data, Error> {
commands: vec![],
prefix_options: poise::PrefixFrameworkOptions {
prefix: Some("!".into()),
edit_tracker: Some(Arc::new(poise::EditTracker::for_timespan(
std::time::Duration::from_mins(10)
))),
case_insensitive_commands: true,
..Default::default()
},
..Default::default()
})
.setup(move |context, _ready, framework| {