Compare commits
7 Commits
4f305b79f6
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6843316518 | |||
| b393e09274 | |||
| 84521c5130 | |||
| c1c16cdfe0 | |||
| 955e373261 | |||
| 2c9dc7a3d2 | |||
| 99c82ef173 |
21
.drone.yml
Normal file
21
.drone.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node
|
||||
commands:
|
||||
- yarn install
|
||||
- yarn run build
|
||||
- name: publish
|
||||
image: plugins/npm
|
||||
settings:
|
||||
username:
|
||||
from_secret: NPM_USERNAME
|
||||
password:
|
||||
from_secret: NPM_PASSWORD
|
||||
email:
|
||||
from_secret: NPM_EMAIL
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
13
README.md
Normal file
13
README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
Node-RED nodes to interact with Teamspeaks query. Basicly it is a wrapper for [TS3-NodeJS-Library](https://github.com/multivit4min/TS3-NodeJS-Library).
|
||||
It includes 3 nodes:
|
||||
- TS3 config (stores connection information)
|
||||
- TS3 call (Call any function on the query)
|
||||
- TS3 event (Listen to any ts3 event)
|
||||
|
||||
To pass parameters to the "call" node simply put it as the `msg.payload` as an array. You can lookup the functions at the TS3-NodeJS-Library [documentation](https://multivit4min.github.io/TS3-NodeJS-Library/classes/teamspeak.teamspeak-2.html).
|
||||
|
||||
# Install
|
||||
`npm i node-red-contrib-teamspeak --save` or via the Node-RED ui.
|
||||
|
||||
# Development
|
||||
There is a docker-compose file that includes a Node-RED and a TS3 instance. To build and test changes simply execute the `docker-pack.sh` file.
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "node-red-contrib-teamspeak",
|
||||
"version": "1.0.0",
|
||||
"description": "Node RED teamspeak node",
|
||||
"main": "index.js",
|
||||
"version": "1.0.1",
|
||||
"description": "Node-RED teamspeak node",
|
||||
"main": "dist/nodes/TS3Config/TS3Config.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc --build && copyfiles -u 2 './src/nodes/**/*.{png,svg}' ./dist/nodes/ && node build/build.js"
|
||||
|
||||
@@ -32,7 +32,7 @@ const nodeInit: NodeInitializer = (RED): void => {
|
||||
if (typeof member === "function"){
|
||||
let args: any[] = []
|
||||
|
||||
if (msg.payload instanceof Array){
|
||||
if (Array.isArray(msg.payload)){
|
||||
args = msg.payload
|
||||
}else{
|
||||
args = [msg.payload]
|
||||
|
||||
@@ -157,6 +157,7 @@
|
||||
</select>
|
||||
<div class="form-row">
|
||||
You can find documentation for all functions
|
||||
<a target="_blank" href="https://multivit4min.github.io/TS3-NodeJS-Library/classes/teamspeak.teamspeak-2.html#on"> here</a>
|
||||
<a target="_blank"
|
||||
href="https://multivit4min.github.io/TS3-NodeJS-Library/classes/teamspeak.teamspeak-2.html#on"> here</a>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user