Skip to content

Commit bd166c1

Browse files
committed
Essentials... Oops
1 parent 9d2d010 commit bd166c1

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

converters/chatchat/essentialschat.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,18 @@ const ChatChatEssentialsChatConverter = new Converter<
2727
},
2828
};
2929

30-
if (!essentialschatConfig.config || !essentialschatConfig.config.chat) {
30+
if (
31+
!essentialschatConfig.essentials ||
32+
!essentialschatConfig.essentials.chat
33+
) {
3134
return {
3235
error: true,
3336
message: "must be object",
3437
};
3538
}
3639

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;
3942
const ccFormat: ChatChatFormat = {
4043
priority: 1,
4144
parts: [],
@@ -47,8 +50,8 @@ const ChatChatEssentialsChatConverter = new Converter<
4750

4851
let formatCount = 1;
4952

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"];
5255
Object.keys(formats).forEach((name) => {
5356
const ecFormat = formats[name];
5457
const ccFormat: ChatChatFormat = {

converters/types/venturechat.json

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,34 @@
66
"type": "object",
77
"properties": {
88
"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"
2810
}
2911
},
3012
"required": [
3113
"venturechat"
3214
]
3315
},
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+
},
3437
"VentureChatFormat": {
3538
"type": "object",
3639
"properties": {

0 commit comments

Comments
 (0)