54 lines
2.0 KiB
HTML
54 lines
2.0 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType('discordInteractionManager', {
|
|
category: 'discord',
|
|
color: '#7289da',
|
|
defaults: {
|
|
name: { value: "", required: false },
|
|
token: { value: "", required: true, type: "discord-token" }
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
icon: "discord.png",
|
|
label: function () {
|
|
return this.name || "discordInteractionManager";
|
|
}
|
|
});
|
|
</script>
|
|
<script type="text/x-red" data-template-name="discordInteractionManager">
|
|
<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>
|
|
</script>
|
|
<script type="text/x-red" data-help-name="discordInteractionManager">
|
|
|
|
<h3>Inputs</h3>
|
|
<dl class="message-properties">
|
|
<dt>action<span class="property-type">string</span></dt>
|
|
<dd>The action you wish to perform. When not set edit is default.</dd>
|
|
|
|
<dt>interactionId<span class="property-type">number</span></dt>
|
|
<dd>Interaction identificator number.</dd>
|
|
|
|
<dt>payload<span class="property-type">string</span></dt>
|
|
<dd>The string you wish to send or the new content of a message when editing.</dd>
|
|
|
|
<dt>embeds<span class="property-type">Object/Array</span></dt>
|
|
<dd>An embed object or an array of embed objects.</dd>
|
|
|
|
<dt>attachments<span class="property-type">String/Object/Array</span></dt>
|
|
<dd>A location to an attachment. Can be online by URL, an object with a buffer payload or a file in the local filesystem.</dd>
|
|
|
|
<dt>autoCompleteChoices<span class="property-type">Array</span></dt>
|
|
<dd>Optional. In autocomplete interactions, the filtered or non-filtered options to respond.</dd>
|
|
|
|
<dt>components<span class="property-type">Array</span></dt>
|
|
<dd>An array of component objects.</dd>
|
|
</dl>
|
|
|
|
</script>
|