mirror of
https://github.com/mii443/rs-docker-bot.git
synced 2025-09-03 15:59:27 +00:00
change log level
This commit is contained in:
@ -38,7 +38,7 @@ fn load_config() -> Option<Config> {
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), ()> {
|
async fn main() -> Result<(), ()> {
|
||||||
env::set_var("RUST_LOG", "info");
|
env::set_var("RUST_LOG", "error");
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
|
||||||
let config = load_config().unwrap();
|
let config = load_config().unwrap();
|
||||||
@ -47,12 +47,15 @@ async fn main() -> Result<(), ()> {
|
|||||||
serenity::GatewayIntents::non_privileged() | serenity::GatewayIntents::MESSAGE_CONTENT;
|
serenity::GatewayIntents::non_privileged() | serenity::GatewayIntents::MESSAGE_CONTENT;
|
||||||
|
|
||||||
let framework = poise::Framework::builder()
|
let framework = poise::Framework::builder()
|
||||||
.setup(move |_ctx, _ready, _framework| {
|
.setup({
|
||||||
|
let config = config.clone();
|
||||||
|
move |_ctx, _ready, _framework| {
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
Ok(Data {
|
Ok(Data {
|
||||||
config: Arc::new(Mutex::new(config.clone())),
|
config: Arc::new(Mutex::new(config)),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.options(poise::FrameworkOptions {
|
.options(poise::FrameworkOptions {
|
||||||
event_handler: |ctx, event, framework, data| {
|
event_handler: |ctx, event, framework, data| {
|
||||||
|
Reference in New Issue
Block a user