1
1
use serde:: { Deserialize , Serialize } ;
2
2
use twilight_model:: guild:: Permissions ;
3
- use twilight_model:: id:: { RoleId , UserId } ;
3
+ use twilight_model:: id:: { ChannelId , RoleId , UserId } ;
4
4
use unic_langid:: LanguageIdentifier ;
5
5
6
6
use crate :: commands:: meta:: nodes:: GearBotPermissions ;
7
+ use crate :: core:: { DataLessLogType , LogFilter , LogType } ;
7
8
use crate :: translation:: DEFAULT_LANG ;
9
+ use std:: collections:: HashMap ;
8
10
9
11
#[ derive( Deserialize , Serialize , Debug ) ]
10
12
pub struct GuildConfig {
@@ -13,6 +15,7 @@ pub struct GuildConfig {
13
15
pub message_logs : MessageLogs ,
14
16
pub language : LanguageIdentifier ,
15
17
pub permission_groups : Vec < PermissionGroup > ,
18
+ pub log_channels : HashMap < ChannelId , LogChannelConfig > ,
16
19
}
17
20
18
21
#[ derive( Deserialize , Serialize , Debug ) ]
@@ -40,15 +43,18 @@ pub enum LogStyle {
40
43
Text ,
41
44
Embed ,
42
45
}
46
+ #[ derive( Deserialize , Serialize , Debug , Eq , PartialEq ) ]
47
+ pub enum LogCategory {
48
+ TEST ,
49
+ }
43
50
44
51
#[ derive( Deserialize , Serialize , Debug ) ]
45
- pub struct LogChannelConfig { }
46
-
47
- #[ derive( Deserialize , Serialize , Debug ) ]
48
- pub enum LogCategories { }
49
-
50
- #[ derive( Deserialize , Serialize , Debug ) ]
51
- pub enum LogSubCategory { }
52
+ pub struct LogChannelConfig {
53
+ pub categories : Vec < LogCategory > ,
54
+ pub disabled_keys : Vec < DataLessLogType > ,
55
+ pub style : LogStyle ,
56
+ pub filters : Vec < LogFilter > ,
57
+ }
52
58
53
59
impl Default for GuildConfig {
54
60
fn default ( ) -> Self {
@@ -100,6 +106,7 @@ impl Default for GuildConfig {
100
106
users: vec![ ] ,
101
107
} ,
102
108
] ,
109
+ log_channels : HashMap :: new ( ) ,
103
110
}
104
111
}
105
112
}
0 commit comments