78 lines
1.8 KiB
HTML
78 lines
1.8 KiB
HTML
<script type="text/javascript">
|
|
RED.nodes.registerType("get-folders", {
|
|
category: "telegram-account",
|
|
color: "#229ED9",
|
|
icon: "tg.png",
|
|
align: "right",
|
|
defaults: {
|
|
name: { value: "" },
|
|
config: {
|
|
type: "config",
|
|
required: false,
|
|
},
|
|
},
|
|
inputs: 1,
|
|
outputs: 1,
|
|
label: function () {
|
|
return this.name || "Get Folders";
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<script type="text/html" data-template-name="get-folders">
|
|
<div class="form-row">
|
|
<label for="node-input-name"> <i class="fa fa-tag"></i> Name </label>
|
|
<input
|
|
type="text"
|
|
id="node-input-name"
|
|
placeholder="Name"
|
|
style="width: 60%"
|
|
/>
|
|
</div>
|
|
<div class="form-row">
|
|
<label for="node-input-config"> <i class="fa fa-tag"></i> Config </label>
|
|
<input
|
|
type="text"
|
|
id="node-input-config"
|
|
placeholder="Config"
|
|
style="width: 60%"
|
|
/>
|
|
</div>
|
|
</script>
|
|
|
|
<script type="text/html" data-help-name="get-folders">
|
|
<p>
|
|
The <b>get-folders</b> node retrieves a list of folders in a Telegram
|
|
account.
|
|
</p>
|
|
|
|
<h3>Inputs</h3>
|
|
<dl class="message-properties">
|
|
<dt>
|
|
payload.client
|
|
<span class="property-type">object</span>
|
|
</dt>
|
|
<dd>An optional Telegram client instance if not configured globally.</dd>
|
|
</dl>
|
|
|
|
<h3>Outputs</h3>
|
|
<dl class="message-properties">
|
|
<dt>
|
|
payload.folders
|
|
<span class="property-type">array</span>
|
|
</dt>
|
|
<dd>
|
|
An array of folder objects. Each folder object contains the following
|
|
properties:
|
|
<ul>
|
|
<li><b>id</b> (string): The unique identifier of the folder.</li>
|
|
<li><b>name</b> (string): The name of the folder.</li>
|
|
<li>
|
|
<b>chatIds</b> (array): An array of chat IDs that belong to the
|
|
folder.
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</script>
|