99 lines
2.9 KiB
HTML
99 lines
2.9 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('discordActivity', {
|
|
category: 'discord',
|
|
color: '#7289da',
|
|
defaults: {
|
|
name: { value: "", required: false },
|
|
atext: { value: "", required: false},
|
|
aurl: { value: "", required: false },
|
|
atype: { value: "", required: false },
|
|
astatus:{value: "", required: false},
|
|
token: { value: "", required: true, type: "discord-token" }
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: "discord.png",
|
|
label: function () {
|
|
return this.name || "discordActivity";
|
|
}
|
|
});
|
|
</script>
|
|
<script type="text/x-red" data-template-name="discordActivity">
|
|
<div class="form-row">
|
|
<label for="node-input-token"><i class="icon-tag"></i> token</label>
|
|
<input type="text" id="node-input-token" placeholder="token">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-atext"><i class="icon-tag"></i> Text</label>
|
|
<input type="text" id="node-input-atext" placeholder="Text to Show">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-aurl"><i class="icon-tag"></i> Youtube or Twitch</label>
|
|
<input type="text" id="node-input-aurl" placeholder="Url">
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-atype"><i class="icon-tag"></i>type</label>
|
|
<select id="node-input-atype">
|
|
<option value="0">Playing</option>
|
|
<option value="1">Streaming</option>
|
|
<option value="2">Listening</option>
|
|
<option value="3">Watching</option>
|
|
<option value="4">Custom (Not Working on Bots)</option>
|
|
<option value="5">Competing</option>
|
|
<option value="6">Reset Activities</option>
|
|
|
|
</select>
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-status"><i class="icon-tag"></i> Show The Bot As</label>
|
|
<select id="node-input-astatus">
|
|
<option value="online">Online</option>
|
|
<option value="idle">Afk</option>
|
|
<option value="invisible">Offline</option>
|
|
<option value="dnd">dnd</option>
|
|
</select>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</script>
|
|
<script type="text/x-red" data-help-name="discordActivity">
|
|
|
|
<h3>Inputs</h3>
|
|
<dl class="message-properties">
|
|
<dt>text
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>The Status Text of the Bot</dd>
|
|
<dt>status
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>The Online Status can be set to: online,idle,invisible,dnd</dd>
|
|
|
|
<dt>type
|
|
<span class="property-type">enum</span>
|
|
</dt>
|
|
<dd>
|
|
Playing: 0 <br>
|
|
Streaming: 1<br>
|
|
Listening: 2 <br>
|
|
Watching: 3 <br>
|
|
Custom: 4 (ATM Not Work on Bot)<br>
|
|
Competing: 5<br>
|
|
Reset Activities: 6<br>
|
|
</dd>
|
|
<dt>url
|
|
<span class="property-type">string</span>
|
|
</dt>
|
|
<dd>The url of Twitch or Youtube</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
</script>
|