File tree Expand file tree Collapse file tree 3 files changed +194
-154
lines changed Expand file tree Collapse file tree 3 files changed +194
-154
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ export const Tools: Record<
29
29
link : "/converters/chatchat/venturechat" ,
30
30
} ,
31
31
] ,
32
+ Legacy : [
33
+ {
34
+ name : "Legacy Text Convert" ,
35
+ short : "MiniMessage" ,
36
+ icon : faCommentDots ,
37
+ description : "Convert Legacy Strings to MiniMessage Strings" ,
38
+ link : "/converters/legacy/minimessage" ,
39
+ }
40
+ ] ,
32
41
} ,
33
42
Validators : [
34
43
{
Original file line number Diff line number Diff line change
1
+ import type { NextPage } from "next" ;
2
+ import Converter from "../../../components/Converter" ;
3
+ import MiniMessage from "../../../converters/minimessage" ;
4
+ import { ConversionError } from "../../../converters/converter" ;
5
+ import { string } from "prop-types" ;
6
+
7
+ const LegacyToMiniMessage : NextPage = ( ) => (
8
+ < Converter
9
+ inputConfigs = { {
10
+ legacy : {
11
+ name : "Legacy Input" ,
12
+ language : "txt" ,
13
+ }
14
+ } }
15
+ outputConfigs = { {
16
+ formatted : {
17
+ name : "MiniMessage Output" ,
18
+ }
19
+ } }
20
+ title = { "MiniMessage String Converter" }
21
+ description = { "Legacy to MiniMessage String Converter" }
22
+ parser = { ( config ) => {
23
+ return {
24
+ error : false ,
25
+ data : { formatted : MiniMessage ( config . legacy ) } ,
26
+ }
27
+ } }
28
+ />
29
+ ) ;
30
+
31
+ export default LegacyToMiniMessage ;
You can’t perform that action at this time.
0 commit comments