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
+3 -2
+3 -2
View File
@@ -129,8 +129,9 @@ export default async function(context: ControllerPluginContext) {
const name = text.toLowerCase().endsWith(verb)
? text.slice(0, -verb.length).trim()
: 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) => {