mirror of
https://github.com/PHIDIAS0303/ClusterChatSync.git
synced 2026-11-24 08:13:12 +09:00
Update controller.ts
This commit is contained in:
1 parent
f28cad665e
commit
0eff19b29c
1 file changed
+7
-1
+7
-1
@@ -131,7 +131,13 @@ export default async function(context: ControllerPluginContext) {
|
|||||||
: text;
|
: text;
|
||||||
|
|
||||||
const instance = await controller.instances.get(instanceId);
|
const instance = await controller.instances.get(instanceId);
|
||||||
await sendMessage(instanceName, `**\`${name}\`** ${verb}${instance.playersOnline.size}`);
|
|
||||||
|
if (!instance) {
|
||||||
|
await sendMessage(instanceName, `**\`${name}\`** ${verb}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
await sendMessage(instanceName, `**\`${name}\`** ${verb} (${instance.playersOnline.size})`);
|
||||||
});
|
});
|
||||||
|
|
||||||
controller.config.on('fieldChanged', (field) => {
|
controller.config.on('fieldChanged', (field) => {
|
||||||
|
|||||||
Reference in new issue
Block a user