kira_framework/configs.rs
1use bevy_ecs::system::Resource;
2use serde::Serialize;
3
4#[derive(Resource, Debug, Clone)]
5pub struct BotConfigs {
6 pub bot_id: i64,
7}
8
9impl BotConfigs {
10 pub fn to_self(&self) -> OneBotEventSelf {
11 OneBotEventSelf {
12 platform: "qq".to_string(),
13 user_id: self.bot_id.to_string()
14 }
15 }
16}
17
18#[derive(Serialize)]
19pub struct OneBotEventSelf {
20 pub platform: String,
21 pub user_id: String
22}