Documentation update
This commit is contained in:
parent
d3a04921d6
commit
c2fe7bfa9a
38
README.md
38
README.md
@ -13,34 +13,24 @@ Silvanus is not affiliated with Grow A Tree or Limbo Labs.
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
If your `/tree` and `/top trees` messages are in the same channel, simple run `/compare` in that channel and you're good to go!
|
If your `/tree` and `/top trees` messages are in the same channel, simply run `/compare` in that channel and you're good to go!
|
||||||
|
|
||||||
Otherwise, run `/setup` to set the proper channels for the bot to look in for the `/tree` and `/top trees` messages.
|
Otherwise, run `/setup compare` to set the proper channels for the bot to look in for the `/tree` and `/top trees` messages.
|
||||||
|
|
||||||
Use `/commands` to view a description of all my commands.
|
Use `/commands` to view a description of all my commands.
|
||||||
|
|
||||||
## Permissions
|
## Permissions
|
||||||
Silvanus requires permissions to `Send Messages` and `Send Messages in Threads` if applicable. If you plan to use the Role Menu Silvanus will also need permission to `Manage Roles`
|
Silvanus requires permissions to `Send Messages` and `Send Messages in Threads` if applicable. If you plan to use the Role Menu Silvanus will also need permission to `Manage Roles`.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
* `/setup` - You only need to run this command if your server has its `/tree` and `/top trees` messages in separate channels.
|
* `/compare` - Compare your tree to others on the leaderboard
|
||||||
* `/setupinfo` - Displays your server's configuration information.
|
* `/relay set` - Setup a Notification Relay for the first time
|
||||||
* `/compare` - Sends a refreshable embed that calculcates the height difference between your tree and the trees currently displayed on your Tallest Trees message. There is also an Active Growth Indicator (`[💧]`).
|
* `/relay update` - Update an already configured Notification Relay
|
||||||
* `/notifications` - Guild members with the `Manage Roles` permission can run this command to set up automatic reminders when your tree is ready to be watered or when fruit is dropping.
|
* `/relay disable` - Disable the Notification Relay
|
||||||
* This feature relies on Grow A Tree's built-in Notification system. Refer to Grow A Tree for instructions on setting them up.
|
* `/rolemenu` - Send a self-assignable role menu for relay pings
|
||||||
* `watchchannel`: Select the channel you've configured Grow A Tree to send notifications in.
|
* `/watertime` - Calculates the time between waters for a tree of a given height
|
||||||
* `watermessage`: This option sets the message to send when the tree is ready to be watered. This can include `@pings`, links, etc.
|
* `/timetoheight` - Calculates how long it would take a tree to grow to a given height
|
||||||
* `pingchannel`: Select the channel you want Silvanus to forward the notifications to.
|
* `/setup compare` - Set the channels to use with `/compare`
|
||||||
* `fruitmessage`: Optional: This sets the message to send when the tree is dropping fruit. If not set, the `watermessage` will be used instead.
|
* `/setup view` - View your server's configuration
|
||||||
* `/rolemenu` - Creates a menu for users to give themselves Water and Fruit pingable roles.
|
* `/setup reset` - Delete your server's configuration
|
||||||
* Requires `Manage Roles` permission to run.
|
* `/help` - Displays the bot's help page
|
||||||
* `waterrole`: Select the role to give users when they select the Water button
|
|
||||||
* `fruitrole`: Optional: Select the role to give users when they select the Fruit button
|
|
||||||
* If this option isn't set, no Fruit Role will be available for self-assignment.
|
|
||||||
* `/watertime` - Calculates the wait time between waters for a tree of a given height.
|
|
||||||
* `height`: The height in feet to calculate for.
|
|
||||||
* `/timetoheight` - Calculates how long it would take to grow to a height
|
|
||||||
* `endheight`: The destination height, in feet.
|
|
||||||
* `beginheight`: Optional: The starting height, in feet. If this option isn't set, the current height of your tree will be used insead.
|
|
||||||
* `/reset` - Removes your server's configuration from the database.
|
|
||||||
* `/help` - Displays the bot's help page and links to each command.
|
|
@ -5,9 +5,9 @@
|
|||||||
"help": {
|
"help": {
|
||||||
"title": "Silvanus Help",
|
"title": "Silvanus Help",
|
||||||
"info": "Silvanus is the ultimate Grow A Tree companion bot! Quickly compare your server's tree to others on the leaderboard with automatic calculation of tree height differences, active growth detection, watering time calculations, and more!\n\nImportant Note: Silvanus is only as up-to-date as your server's newest Tree and Tallest Trees messages. Make sure to refresh them before refreshing Silvanus' Compare message.",
|
"info": "Silvanus is the ultimate Grow A Tree companion bot! Quickly compare your server's tree to others on the leaderboard with automatic calculation of tree height differences, active growth detection, watering time calculations, and more!\n\nImportant Note: Silvanus is only as up-to-date as your server's newest Tree and Tallest Trees messages. Make sure to refresh them before refreshing Silvanus' Compare message.",
|
||||||
"setup": "If your ``/tree`` and ``/top trees`` messages are in the same channel, simple run </compare:1065346941166297128> in that channel and you're good to go!\n\nOtherwise, run </setup:1065407649363005561> to set the proper channels for the bot to look in for the ``/tree`` and ``/top trees`` messages.\n\nUse </commands:1069501270454456331> to view a description of all my commands.",
|
"setup": "If your </tree:972648557796524032> and </top trees:1051840665362894950> messages are in the same channel, simply run </compare:1065346941166297128> in that channel and you're good to go!\n\nOtherwise, run </setup compare:1065407649363005561> to set the proper channels for the bot to look in for the </tree:972648557796524032> and </top trees:1051840665362894950> messages.\n\nUse </commands:1077058896469966888> to view a description of all my commands.",
|
||||||
"permissions": "At a minimum, Silvanus requires permissions to `Send Messages` and `Send Messages in Threads` if applicable. If Analyzer is given permission to `Manage Messages`, the bot will delete the `.settree` and `.setranks` messages to reduce spam.",
|
"permissions": "At a minimum, Silvanus requires permissions to `Send Messages` and `Send Messages in Threads` if applicable. If Analyzer is given permission to `Manage Messages`, the bot will delete the `.settree` and `.setranks` messages to reduce spam.",
|
||||||
"allCommands": "</setup:1065407649363005561> - You only need to run this command if your server has its ``/tree`` and ``/top trees`` messages in separate channels.\n</setupinfo:1065413032374706196> - Displays your server's configuration information.\n</compare:1065346941166297128> - Sends a refreshable embed that calculcates the height difference between your tree and the trees currently displayed on your Tallest Trees message. There is also an Active Growth Indicator (``[💧]``).\n</notifications:0> - Guild members with the ``Manage Roles`` permission can run this command to set up automatic reminders when your tree is ready to be watered or when fruit is dropping.\n This feature relies on Grow A Tree's built-in Notification system. Refer to Grow A Tree for instructions on setting them up.\n ``watchchannel``: Select the channel you've configured Grow A Tree to send notifications in.\n ``watermessage``: This option sets the message to send when the tree is ready to be watered. This can include ``@pings``, links, etc.\n ``pingchannel``: Select the channel you want Silvanus to forward the notifications to.\n ``fruitmessage``: Optional: This sets the message to send when the tree is dropping fruit. If not set, the ``watermessage`` will be used instead.\n</rolemenu:0> - Creates a menu for users to give themselves Water and Fruit pingable roles.\n Requires ``Manage Roles`` permission to run.\n ``waterrole``: Select the role to give users when they select the Water button\n ``fruitrole``: Optional: Select the role to give users when they select the Fruit button\n If this option isn't set, no Fruit Role will be available for self-assignment.\n</watertime:1066970330029113444> - Calculates the wait time between waters for a tree of a given height.\n ``height``: The height in feet to calculate for.\n</timetoheight:1067727254634889227> - Calculates how long it would take to grow to a height\n ``endheight``: The destination height, in feet.\n ``beginheight``: Optional: The starting height, in feet. If this option isn't set, the current height of your tree will be used insead.\n</reset:1065412317052944476> - Removes your server's configuration from the database.\n</help:1065346941166297129> - Displays the bot's help page and links to each command."
|
"allCommands": "</compare:1077058896469966889> - Compare your tree to others on the leaderboard\n</relay set:0> - Setup a Notification Relay for the first time\n</relay update:0> - Update an already configured Notification Relay\n</relay disable:0> - Disable the Notification Relay\n</rolemenu:1077058896469966892> - Send a self-assignable role menu for relay pings\n</watertime:1077058896469966895> - Calculates the time between waters for a tree of a given height\n</timetoheight:1077058896469966894> - Calculates how long it would take a tree to grow to a given height\n</setup compare:1077058896469966893> - Set the channels to use with </compare:1077058896469966889>\n</setup view:1077058896469966893> - View your server's configuration\n</setup reset:1077058896469966893> - Delete your server's configuration\n</help:1077058896469966890> - Displays the bot's help page"
|
||||||
},
|
},
|
||||||
"commands": {
|
"commands": {
|
||||||
"compare": "</compare:1065346941166297128>",
|
"compare": "</compare:1065346941166297128>",
|
||||||
|
@ -1,34 +1,29 @@
|
|||||||
/*
|
const commands = [
|
||||||
</setup:1065407649363005561>
|
{raw: "`/compare`", clickable: "</compare:1077058896469966889>"},
|
||||||
</setupinfo:1065413032374706196>
|
{raw: "`/relay set`", clickable: "</relay set:0>"},
|
||||||
</compare:1065346941166297128>
|
{raw: "`/relay update`", clickable: "</relay update:0>"},
|
||||||
</setping:1068373237995683902>
|
{raw: "`/relay disable`", clickable: "</relay disable:0>"},
|
||||||
</optout:1068753032801693758>
|
{raw: "`/rolemenu`", clickable: "</rolemenu:1077058896469966892>"},
|
||||||
</watertime:1066970330029113444>
|
{raw: "`/watertime`", clickable: "</watertime:1077058896469966895>"},
|
||||||
</timetoheight:1067727254634889227>
|
{raw: "`/timetoheight`", clickable: "</timetoheight:1077058896469966894>"},
|
||||||
</reset:1065412317052944476>
|
{raw: "`/setup compare`", clickable: "</setup compare:1077058896469966893>"},
|
||||||
</help:1065346941166297129>
|
{raw: "`/setup view`", clickable: "</setup view:1077058896469966893>"},
|
||||||
</tree:972648557796524032>
|
{raw: "`/setup reset`", clickable: "</setup reset:1077058896469966893>"},
|
||||||
</top trees:1051840665362894950>
|
{raw: "`/help`", clickable: "</help:1077058896469966890>"},
|
||||||
*/
|
{raw: "`/tree`", clickable: "</tree:972648557796524032>"},
|
||||||
|
{raw: "`/top trees`", clickable: "</top trees:1051840665362894950>"},
|
||||||
|
{raw: "`/commands`", clickable: "</commands:1077058896469966888>"}
|
||||||
|
];
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const replaceAll = require('string.prototype.replaceall');
|
const replaceAll = require('string.prototype.replaceall');
|
||||||
const path = "./modules/input.txt";
|
const path = "./modules/input.txt";
|
||||||
const string = fs.readFileSync(path).toString();
|
const string = fs.readFileSync(path).toString();
|
||||||
let newString = replaceAll(string, '\* ', '');
|
let newString = replaceAll(string, '\* ', '');
|
||||||
newString = replaceAll(newString, '\r\n', '\\n');
|
newString = replaceAll(newString, '\n', '\\n');
|
||||||
newString = replaceAll(newString, '\t', ' - ');
|
newString = replaceAll(newString, '\t', ' - ');
|
||||||
newString = replaceAll(newString, '`/setup`', '</setup:1065407649363005561>');
|
commands.forEach(command => {
|
||||||
newString = replaceAll(newString, '`/setupinfo`', '</setupinfo:1065413032374706196>');
|
newString = replaceAll(newString, command.raw, command.clickable);
|
||||||
newString = replaceAll(newString, '`/compare`', '</compare:1065346941166297128>');
|
});
|
||||||
newString = replaceAll(newString, '`/watertime`', '</watertime:1066970330029113444>');
|
|
||||||
newString = replaceAll(newString, '`/timetoheight`', '</timetoheight:1067727254634889227>');
|
|
||||||
newString = replaceAll(newString, '`/reset`', '</reset:1065412317052944476>');
|
|
||||||
newString = replaceAll(newString, '`/help`', '</help:1065346941166297129>');
|
|
||||||
newString = replaceAll(newString, '`/commands`', '</commands:1069501270454456331>');
|
|
||||||
newString = replaceAll(newString, '`/notifications`', '</notifications:0>');
|
|
||||||
newString = replaceAll(newString, '`/rolemenu`', '</rolemenu:0>');
|
|
||||||
newString = replaceAll(newString, '`', '``');
|
newString = replaceAll(newString, '`', '``');
|
||||||
fs.writeFileSync(path, newString);
|
fs.writeFileSync(path, newString);
|
||||||
return "Done";
|
return "Done";
|
@ -14,7 +14,7 @@ module.exports = {
|
|||||||
{ name: "True", value: "true" },
|
{ name: "True", value: "true" },
|
||||||
{ name: "False", value: "false" })),
|
{ name: "False", value: "false" })),
|
||||||
execute(interaction) {
|
execute(interaction) {
|
||||||
const helpEmbed = fn.builders.helpEmbed(`${strings.help.info}\n\n**Setup**\n${strings.help.setup}\n\nSee </commands:0> for a list of all my commands\n\n**Support Server**\n${strings.urls.supportServer}`, interaction.options.getString('private'));
|
const helpEmbed = fn.builders.helpEmbed(`${strings.help.info}\n\n**Setup**\n${strings.help.setup}\n\n**Support Server**\n${strings.urls.supportServer}`, interaction.options.getString('private'));
|
||||||
interaction.reply(helpEmbed);
|
interaction.reply(helpEmbed);
|
||||||
},
|
},
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user