File tree Expand file tree Collapse file tree 2 files changed +30
-24
lines changed Expand file tree Collapse file tree 2 files changed +30
-24
lines changed Original file line number Diff line number Diff line change @@ -27,15 +27,18 @@ const ChatChatEssentialsChatConverter = new Converter<
27
27
} ,
28
28
} ;
29
29
30
- if ( ! essentialschatConfig . config || ! essentialschatConfig . config . chat ) {
30
+ if (
31
+ ! essentialschatConfig . essentials ||
32
+ ! essentialschatConfig . essentials . chat
33
+ ) {
31
34
return {
32
35
error : true ,
33
36
message : "must be object" ,
34
37
} ;
35
38
}
36
39
37
- if ( essentialschatConfig . config . chat . format ) {
38
- const format = essentialschatConfig . config . chat . format ;
40
+ if ( essentialschatConfig . essentials . chat . format ) {
41
+ const format = essentialschatConfig . essentials . chat . format ;
39
42
const ccFormat : ChatChatFormat = {
40
43
priority : 1 ,
41
44
parts : [ ] ,
@@ -47,8 +50,8 @@ const ChatChatEssentialsChatConverter = new Converter<
47
50
48
51
let formatCount = 1 ;
49
52
50
- if ( essentialschatConfig . config . chat [ "group-formats" ] ) {
51
- const formats = essentialschatConfig . config . chat [ "group-formats" ] ;
53
+ if ( essentialschatConfig . essentials . chat [ "group-formats" ] ) {
54
+ const formats = essentialschatConfig . essentials . chat [ "group-formats" ] ;
52
55
Object . keys ( formats ) . forEach ( ( name ) => {
53
56
const ecFormat = formats [ name ] ;
54
57
const ccFormat : ChatChatFormat = {
Original file line number Diff line number Diff line change 6
6
"type" : " object" ,
7
7
"properties" : {
8
8
"venturechat" : {
9
- "type" : " object" ,
10
- "properties" : {
11
- "tellformatto" : {
12
- "type" : " string"
13
- },
14
- "tellformatfrom" : {
15
- "type" : " string"
16
- },
17
- "jsonformatting" : {
18
- "type" : " object" ,
19
- "additionalProperties" : {
20
- "$ref" : " #/definitions/VentureChatFormat"
21
- }
22
- }
23
- },
24
- "required" : [
25
- " tellformatto" ,
26
- " tellformatfrom"
27
- ]
9
+ "$ref" : " #/definitions/VentureChatConfig"
28
10
}
29
11
},
30
12
"required" : [
31
13
" venturechat"
32
14
]
33
15
},
16
+ "VentureChatConfig" : {
17
+ "type" : " object" ,
18
+ "properties" : {
19
+ "tellformatto" : {
20
+ "type" : " string"
21
+ },
22
+ "tellformatfrom" : {
23
+ "type" : " string"
24
+ },
25
+ "jsonformatting" : {
26
+ "type" : " object" ,
27
+ "additionalProperties" : {
28
+ "$ref" : " #/definitions/VentureChatFormat"
29
+ }
30
+ }
31
+ },
32
+ "required" : [
33
+ " tellformatto" ,
34
+ " tellformatfrom"
35
+ ]
36
+ },
34
37
"VentureChatFormat" : {
35
38
"type" : " object" ,
36
39
"properties" : {
You can’t perform that action at this time.
0 commit comments