File tree Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Expand file tree Collapse file tree 1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -119,29 +119,17 @@ export const processButton = async (interaction: ButtonInteraction<"cached">) =>
119
119
anotherUserDocument . nickname = ticket . data . nickname ;
120
120
anotherUserDocument . safeSave ( ) ;
121
121
122
- const [ main , plots ] = await Promise . all ( [ ( async ( ) => {
123
- const rcon = new RCON ( ) ;
124
- await rcon . connect ( config . rcon . main . host , config . rcon . main . port ) ;
125
- await rcon . login ( config . rcon . main . password ) ;
126
- const result = await rcon . execute ( `easywl add ${ ticket . data . nickname } ` ) ;
127
- rcon . close ( ) ;
128
-
129
- return escapeMarkdown ( clearMcColors ( result ) ) ;
130
- } ) ( ) , ( async ( ) => {
131
- const rcon = new RCON ( ) ;
132
- await rcon . connect ( config . rcon . plots . host , config . rcon . plots . port ) ;
133
- await rcon . login ( config . rcon . plots . password ) ;
134
- const result = await rcon . execute ( `easywl add ${ ticket . data . nickname } ` ) ;
135
- rcon . close ( ) ;
136
-
137
- return escapeMarkdown ( clearMcColors ( result ) ) ;
138
- } ) ( ) ] ) ;
122
+ const rcon = new RCON ( ) ;
123
+ await rcon . connect ( config . rcon . main . host , config . rcon . main . port ) ;
124
+ await rcon . login ( config . rcon . main . password ) ;
125
+ const result = await rcon . execute ( `easywl add ${ ticket . data . nickname } ` ) ;
126
+ rcon . close ( ) ;
127
+
128
+ const main = escapeMarkdown ( clearMcColors ( result ) ) ;
139
129
140
130
await interaction . editReply ( [
141
131
"main:" ,
142
- main ,
143
- "plots:" ,
144
- plots
132
+ main
145
133
] . join ( "\n" ) ) ;
146
134
147
135
await interaction . channel ! . send ( {
You can’t perform that action at this time.
0 commit comments