From 00be5a45d12716cdf76a2b89a4b1d05ecb5d4024 Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:50:30 +0200 Subject: [PATCH 01/10] Update channelType.md --- src/bdscript/channelType.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/bdscript/channelType.md b/src/bdscript/channelType.md index 4a71599f73..237399d21a 100644 --- a/src/bdscript/channelType.md +++ b/src/bdscript/channelType.md @@ -1,15 +1,15 @@ # $channelType - -Returns channel type. +Returns the type of a channel. ## Syntax ``` -$channelType[channel ID] +$channelType[Channel ID] ``` + > The different channel types that the bot will return are: `text`, `voice`, `category`, `thread`, `dm`, `stage`, `announcement` and `forum`. ### Parameters -- `channel ID` `(Type: Snowflake || Flag: Required)`: The channel which type will be returned. +- `Channel ID` `(Type: Snowflake || Flag: Required)`: The channel which type will be returned. ## Example @@ -17,3 +17,10 @@ $channelType[channel ID] $nomention $channelType[$channelID] ``` +**Text Channel** + +![example1](https://user-images.githubusercontent.com/111157596/250920367-a11b2e62-deb7-44ef-a3aa-1e7975c61020.png) + +**DM Channel** + +![example2](https://user-images.githubusercontent.com/111157596/250920478-108e1b24-dfdc-4609-aedc-9ea328ac33fb.png) From da51b1dafbe43c69d532b0f0fa193b06aacba1ea Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:51:17 +0200 Subject: [PATCH 02/10] Update charCount.md --- src/bdscript/charCount.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bdscript/charCount.md b/src/bdscript/charCount.md index a7a23aeb11..b6ea3528db 100644 --- a/src/bdscript/charCount.md +++ b/src/bdscript/charCount.md @@ -1,16 +1,17 @@ # $charCount -Gets the amount of characters in the provided 'text'. +Returns the amount of characters in the provided "Text". ## Syntax ``` -$charCount[text] +$charCount[Text] ``` ### Parameters -- `text` `(Type: String || Flag: Emptiable)`: The text to return the character count for. +- `Text` `(Type: String || Flag: Emptiable)`: The text to return the character count for. ## Example ``` -$charCount[$message] +$nomention +Your message has **$charCount[$message]** characters. ``` -> 🧙‍♂️ This example would return how many characters were in the author's message. +![example](https://user-images.githubusercontent.com/111157596/250920649-1ed2b250-8bcb-4c00-bff4-e3c06c1668ca.png) From 3bd79a0d019dd25f45e6ef47cdfbe9ca6fc815df Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:52:40 +0200 Subject: [PATCH 03/10] Update dm.md --- src/bdscript/dm.md | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/src/bdscript/dm.md b/src/bdscript/dm.md index 3336d3c2fc..d7d7c7de0c 100644 --- a/src/bdscript/dm.md +++ b/src/bdscript/dm.md @@ -1,31 +1,19 @@ # $dm -Direct messages a user. +Direct messages the user who runs the command. -## Usages -There are three possible usages of the `$dm` function. - -### Usage #1 +## Syntax ``` $dm ``` -This will send the message to the user that runs the command. - -### Usage #2 -``` -$dm[] -``` -This will send the message to the first mentioned user. -### Usage #3 +## Example ``` -$dm[UserID;...] +$nomention +$dm +Hello! ``` -This will send the message to every user with given User ID. - -## Parameters -- `userID` `(Type: Snowflake || Flag: Emptiable)`: The user to whom to send the direct message. - - +![example](https://user-images.githubusercontent.com/111157596/250920927-01f8c481-ab76-4810-a940-e060f7396003.png)\ +![example](https://user-images.githubusercontent.com/111157596/250920959-d1d8ecda-5a3a-4b65-9135-0502d13c6520.png) ## Note -If the command fails to send the message, make sure the user allows dm messages from everyone. +If the command fails to send the message, make sure you allow direct messages from everyone. From 5be0feb0e1c912713f6030f0d2de5f00c7257980 Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:54:07 +0200 Subject: [PATCH 04/10] Create dmComplex.md --- src/bdscript/dmComplex.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/bdscript/dmComplex.md diff --git a/src/bdscript/dmComplex.md b/src/bdscript/dmComplex.md new file mode 100644 index 0000000000..d8bcd34169 --- /dev/null +++ b/src/bdscript/dmComplex.md @@ -0,0 +1,34 @@ +# $dm[] +Direct messages one or multiple users. + +## Syntax +``` +$dm[User ID;...] +``` + +### Parameters +- `User ID` `(Type: Snowflake || Flag: Emptiable)`: The user to whom to send the direct message. Use semicolons `;` as a separator to separate multiple user IDs. + +> 🧙‍♂️ You can leave the `User ID` argument empty to direct message the mentioned user. See [Example #1](#example-1) below. + +## Examples +### Example #1 +*This will direct message the mentioned user.* +``` +$nomention +$dm[] +$displayName says hello 👋 +``` +![example1](https://user-images.githubusercontent.com/111157596/250921279-a0f6cf34-8a24-49aa-a678-d1b015542b0a.png)\ +![example1](https://user-images.githubusercontent.com/111157596/250921319-335229ed-6002-424c-8634-d6c33815d792.png) + +### Example #2 +*This will direct message all the specified users.* +``` +$nomention +$dm[871078018041409608;729343563401265193] +$displayName says hello 👋 +``` + +## Note +If the command fails to send the message, make sure the user allows direct messages from everyone. From 50e53583ed1d544110ac1f9d9f27b2a5796fdf75 Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:55:55 +0200 Subject: [PATCH 05/10] Update giveRole.md --- src/bdscript/giveRole.md | 43 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/src/bdscript/giveRole.md b/src/bdscript/giveRole.md index 23e096ea52..c74dd1093c 100644 --- a/src/bdscript/giveRole.md +++ b/src/bdscript/giveRole.md @@ -1,36 +1,37 @@ # $giveRole *(deprecated)* -> 🧙‍♂️ This command is deprecated instead better use [$roleGrant](./roleGrant.md). -Adds a role to the provided user. - -## Usages -There are two usages of the `$giveRole` function. - -### Usage #1 -``` -$giveRole[userID;roleID] -``` -Gives a role to the provided user. +> 🧙‍♂️ This command is deprecated, instead better use [`$roleGrant[]`](./roleGrant.md). -#### Breakdown -- `userID` - The user to give the role to. -- `roleID` - The role to give the user. +Adds a role to the provided user. -### Usage #2 +## Syntax ``` -$giveRole[roleID] +$giveRole[User/Role ID;(Role ID)] ``` -Gives the provided role to the mentioned user. -#### Breakdown -- `roleID` - The role to give the mentioned user. +### Parameters +- `User/Role ID` `(Type: Snowflake || Flag: Required)`: The user to add the specified role to **or** the role to add to the mentioned users. If only this parameter is provided, it will be read as "Role ID". +- `Role ID` `(Type: Snowflake || Flag: Optional)`: The role to add to the user. If this parameter is used, it reads the first parameter as "User ID". -## Example +## Examples +### Example #1 ``` +$nomention $onlyPerms[manageroles;Missing permissions!] $giveRole[807004801753284618] + Added $roleName[807004801753284618] to $username[$mentioned[1]]! ``` +![example1](https://user-images.githubusercontent.com/69215413/123468942-6e8b6b80-d5c0-11eb-9102-afc48b70f622.png) -![example](https://user-images.githubusercontent.com/69215413/123468942-6e8b6b80-d5c0-11eb-9102-afc48b70f622.png) +### Example #2 +``` +$nomention +$onlyPerms[manageroles;Missing permissions!] +$trimContent +$giveRole[$mentioned[1];$message[2]] + +Added the role **$roleName[$message[2]]** to **$username[$mentioned[1]]**! +``` +![example2](https://user-images.githubusercontent.com/111157596/250921826-a2a32410-a9da-4609-bee7-4076b8951e8b.png) From ff8e08899165a80f73ec782a114d724a9e64a814 Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:56:35 +0200 Subject: [PATCH 06/10] Update giveRole.md --- src/bdscript/giveRole.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bdscript/giveRole.md b/src/bdscript/giveRole.md index c74dd1093c..c55ddb84ab 100644 --- a/src/bdscript/giveRole.md +++ b/src/bdscript/giveRole.md @@ -19,8 +19,8 @@ $giveRole[User/Role ID;(Role ID)] ``` $nomention $onlyPerms[manageroles;Missing permissions!] -$giveRole[807004801753284618] +$giveRole[807004801753284618] Added $roleName[807004801753284618] to $username[$mentioned[1]]! ``` ![example1](https://user-images.githubusercontent.com/69215413/123468942-6e8b6b80-d5c0-11eb-9102-afc48b70f622.png) @@ -30,8 +30,8 @@ Added $roleName[807004801753284618] to $username[$mentioned[1]]! $nomention $onlyPerms[manageroles;Missing permissions!] $trimContent -$giveRole[$mentioned[1];$message[2]] +$giveRole[$mentioned[1];$message[2]] Added the role **$roleName[$message[2]]** to **$username[$mentioned[1]]**! ``` ![example2](https://user-images.githubusercontent.com/111157596/250921826-a2a32410-a9da-4609-bee7-4076b8951e8b.png) From 741bb11799e14a795415ffbfff323d4a8487867b Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:57:38 +0200 Subject: [PATCH 07/10] Update ping.md --- src/bdscript/ping.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/bdscript/ping.md b/src/bdscript/ping.md index 47fda569f2..ce3a665b3c 100644 --- a/src/bdscript/ping.md +++ b/src/bdscript/ping.md @@ -1,14 +1,14 @@ # $ping -Shows the delay between sent message and bot's response. -The value of `$ping` is expressed in miliseconds. +Returns the ping of the bot's node, in milliseconds. -## Example command: +## Syntax ``` -Ping: $ping ms +$ping ``` -#### Expected output: +## Example ``` -Ping: 50 ms +$nomention +Pong! `$pingms` ``` -⠀ +![example](https://user-images.githubusercontent.com/111157596/250922355-2b9717e6-e175-4feb-a218-f121f886a324.png) From f689a0527cbfff51d3fe8c270885611a95c4c969 Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:59:34 +0200 Subject: [PATCH 08/10] Update takeRole.md --- src/bdscript/takeRole.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/bdscript/takeRole.md b/src/bdscript/takeRole.md index 803bf1fd33..479bb3cd78 100644 --- a/src/bdscript/takeRole.md +++ b/src/bdscript/takeRole.md @@ -1,20 +1,23 @@ # $takeRole -Removes a role from the provided/mentioned user. +*(deprecated)* -> 📌 As of December 2021, this function has been deprecated in favor of [$roleGrant](./roleGrant.md). +> 📌 As of December 2021, this function has been deprecated in favor of [`$roleGrant[]`](./roleGrant.md). > > 📌 In order to remove a role from a user, the bot must have the `manageroles` permission. +Removes a role from the provided/mentioned user. + ## Syntax ``` $takeRole[User/Role ID;(Role ID)] ``` ### Parameters -- `User/Role ID` `(Type: Snowflake || Flag: Required)`: The user to remove the role from or the role to remove from the mentioned users. If this parameter is only provided, it reads as "Role ID". +- `User/Role ID` `(Type: Snowflake || Flag: Required)`: The user to remove the specified role from **or** the role to remove from the mentioned users. If only this parameter is provided, it will be read as "Role ID". - `Role ID` `(Type: Snowflake || Flag: Optional)`: The role to remove from the user. If this parameter is used, it reads the first parameter as "User ID". -## Example +## Examples +### Example #1 ``` $nomention $allowRoleMentions[] @@ -22,8 +25,20 @@ $allowRoleMentions[] $takeRole[$mentionedRoles[1]] Removed <@&$mentionedRoles[1]> from the mentioned users! ``` -![Screenshot_20221029_193751](https://user-images.githubusercontent.com/95774950/198837013-a39c8a69-29aa-4cec-b319-0b04365c200d.png) +![example1](https://user-images.githubusercontent.com/95774950/198837013-a39c8a69-29aa-4cec-b319-0b04365c200d.png) + +### Example #2 +``` +$nomention +$allowMention +$allowRoleMentions[] + +$takeRole[$message[1];$mentionedRoles[1]] +Removed the role <@&$mentionedRoles[1]> from <@$message[1]>! +``` +![example2](https://user-images.githubusercontent.com/111157596/250922731-73a8a86d-d5ba-4cbf-a4cd-87f13440eeea.png)\ +![example2](https://user-images.githubusercontent.com/111157596/250922753-4db7473e-a85a-43d3-b88b-f97e0e869533.png) ## Related Resources -- [$roleGrant](./roleGrant.md) -- [$giveRole](./giveRole.md) +- [`$roleGrant[]`](./roleGrant.md) +- [`$giveRole[]`](./giveRole.md) From 64489059ac5c33e71192b8acd6bde3401e10cefe Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:00:04 +0200 Subject: [PATCH 09/10] Update giveRole.md --- src/bdscript/giveRole.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bdscript/giveRole.md b/src/bdscript/giveRole.md index c55ddb84ab..e93c00d68f 100644 --- a/src/bdscript/giveRole.md +++ b/src/bdscript/giveRole.md @@ -35,3 +35,7 @@ $giveRole[$mentioned[1];$message[2]] Added the role **$roleName[$message[2]]** to **$username[$mentioned[1]]**! ``` ![example2](https://user-images.githubusercontent.com/111157596/250921826-a2a32410-a9da-4609-bee7-4076b8951e8b.png) + +## Related Resources +- [`$roleGrant[]`](./roleGrant.md) +- [`$takeRole[]`](./takeRole.md) From 81f8ee8b881b836c03b0c86ff2d74f32c0b63dbe Mon Sep 17 00:00:00 2001 From: Nicky <111157596+xNickyDev@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:01:02 +0200 Subject: [PATCH 10/10] Update SUMMARY.md --- src/SUMMARY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 2e8650b876..599a32fb90 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -159,6 +159,7 @@ - [$displayName[]](./bdscript/displayNameComplex.md) - [$divide](./bdscript/divide.md) - [$dm](./bdscript/dm.md) + - [$dm[]](./bdscript/dmComplex.md) - [$dmChannelID](./bdscript/dmChannelID.md) - [$editButton](./bdscript/editButton.md) - [$editChannelPerms](./bdscript/editChannelPerms.md)