diff --git a/src/nodes/ts3-config/ts3-config.ts b/src/nodes/ts3-config/ts3-config.ts index e5ef974..4babe8f 100644 --- a/src/nodes/ts3-config/ts3-config.ts +++ b/src/nodes/ts3-config/ts3-config.ts @@ -44,7 +44,6 @@ const nodeInit: NodeInitializer = (RED): void => { if (client != null){ await client.reconnect(-1, 1000) }else{ - // TODO: Emit error this.emit("error") } }else{ diff --git a/src/nodes/ts3-get/handleGet.ts b/src/nodes/ts3-get/handleGet.ts new file mode 100644 index 0000000..790032c --- /dev/null +++ b/src/nodes/ts3-get/handleGet.ts @@ -0,0 +1,13 @@ +import { NodeMessageInFlow } from "node-red"; +import { TeamSpeak } from "ts3-nodejs-library"; +import { GetFunctions } from "./types"; + +export default async function handleGet(func: GetFunctions, client: TeamSpeak, options: any): Promise{ + switch (func) { + case GetFunctions.CLIENTS_LIST: + return client.clientList(options) + + default: + break; + } +} \ No newline at end of file diff --git a/src/nodes/ts3-get/ts3-get.html b/src/nodes/ts3-get/ts3-get.html index b24fd07..b23c0e1 100644 --- a/src/nodes/ts3-get/ts3-get.html +++ b/src/nodes/ts3-get/ts3-get.html @@ -3,7 +3,8 @@ category: 'function', color: '#a6bbcf', defaults: { - configid: {type:"ts3-config"} + configid: {type:"ts3-config"}, + selection: {default: ""} }, inputs: 1, outputs: 1, @@ -18,6 +19,12 @@ +
+ + +