Refactor Discord message handling and connection logic

This commit is contained in:
phidias authored and GitHub committed 2026-10-12 14:27:51 +09:00
1 parent e53c997260
commit d1999a9156
1 file changed
+2 -1
+2 -1
View File
@@ -130,7 +130,8 @@ export default async function(context: ControllerPluginContext) {
? text.slice(0, -verb.length).trim() ? text.slice(0, -verb.length).trim()
: text; : text;
await sendMessage(instanceName, `**\`${name}\`** ${verb}`); const pc = await controller.instances.get(instanceName).sendRcon(`/_rcon return #game.connected_players`, false, instanceName);
await sendMessage(instanceName, `**\`${name}\`** ${verb} (${pc})`);
}); });
controller.config.on('fieldChanged', (field) => { controller.config.on('fieldChanged', (field) => {