From dbe2ff8085a607a49c80283904e5e75364ed56a7 Mon Sep 17 00:00:00 2001 From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:09:53 +0300 Subject: [PATCH 1/6] Create setUserRoles.md --- src/bdscript/setUserRoles.md | 63 ++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 src/bdscript/setUserRoles.md diff --git a/src/bdscript/setUserRoles.md b/src/bdscript/setUserRoles.md new file mode 100644 index 0000000000..691c4dafd1 --- /dev/null +++ b/src/bdscript/setUserRoles.md @@ -0,0 +1,63 @@ +# $setUserRoles +Overrides all roles of the given user. + +## Syntax +``` +$setUserRoles[User ID;Role ID;...] +``` + +### Parameters +- `User ID` `(Type: Snowflake || Flag: Required)`: ID of the user to set the role. +- `Role ID` `(Type: Snowflake || Flag: Required)`: Roles to be given to the user. Separate roles using `;`. + +## Example +``` +$nomention +$setUserRoles[$authorID;$roleID[Support]] +We've reset all your roles! Now you have "Support" role. +``` +*In this example, we will remove all roles and give one role with "Support" name*. + +```discord yaml +- user_id: 803569638084313098 + username: RainbowKey + content: | + !roles +- user_id: 1009018156494368798 + username: BDFD Support + bot: true + verified: true + content: | + Cool + BDFD + Moderator +- user_id: 803569638084313098 + username: RainbowKey + content: | + !example +- user_id: 1009018156494368798 + username: BDFD Support + bot: true + verified: true + content: | + We've reset all your roles! Now you have "Support" role. +- user_id: 803569638084313098 + username: RainbowKey + content: | + !roles +- user_id: 1009018156494368798 + username: BDFD Support + bot: true + verified: true + content: | + Support +``` + +> How [$roleID[]](./roleID.md) and [$authorID](./authorID.md) works? + +### Code for `!roles` command: +``` +$nomention +$userRoles[$authorID] +``` +> How [$userRoles[]](./userRoles.md) works? From c7d9dd0174a98b8b62a14a732cc01c21ed57ec6a Mon Sep 17 00:00:00 2001 From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:13:47 +0300 Subject: [PATCH 2/6] Create livetime.js --- src/theme/livetime.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/theme/livetime.js diff --git a/src/theme/livetime.js b/src/theme/livetime.js new file mode 100644 index 0000000000..61389938e3 --- /dev/null +++ b/src/theme/livetime.js @@ -0,0 +1,11 @@ +var day = new Date().getDate(); +var time = new Date().getTime(); +var second = new Date().getSeconds(); +var minute = new Date().getMinutes(); +var hour = new Date().getHours(); + +document.getElementById('day').innerHTML = "Current day: " + day; +document.getElementById('unix').innerHTML = time; +document.getElementById('second').innerHTML = "Current second: " + second; +document.getElementById('minute').innerHTML = "Current minute: " + minute; +document.getElementById('hour').innerHTML = "Current hour: " + hour; From 8b9a82439320b8c213307e6c2776536ac5109b99 Mon Sep 17 00:00:00 2001 From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:16:16 +0300 Subject: [PATCH 3/6] Update hour.md --- src/bdscript/hour.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bdscript/hour.md b/src/bdscript/hour.md index faac706cb9..2c6fd4f7e0 100644 --- a/src/bdscript/hour.md +++ b/src/bdscript/hour.md @@ -27,5 +27,7 @@ Current Hour: $hour color: "#748BD4" bot: true content: | - Current Hour: 21 +
``` + + From 8486b83120c365376d7e97b375e4455b75a0253c Mon Sep 17 00:00:00 2001 From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:16:32 +0300 Subject: [PATCH 4/6] Update hour.md --- src/bdscript/hour.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bdscript/hour.md b/src/bdscript/hour.md index 2c6fd4f7e0..1831ceb7d6 100644 --- a/src/bdscript/hour.md +++ b/src/bdscript/hour.md @@ -1,9 +1,9 @@ # $hour Returns the current hour. -> 🧙♂️ You can use [`$time`](./time.md) to change the timezone. +> You can use [`$time`](./time.md) to change the timezone. -> 📝 The `$hour` function uses the twenty-four-hour clock instead of two groups of twelve hours; this is also known as "Military Time". +> The `$hour` function uses the twenty-four-hour clock instead of two groups of twelve hours; this is also known as "Military Time". ## Syntax ``` From 185e9c9005c3e3eb588b6766e6d9cf3fb2512791 Mon Sep 17 00:00:00 2001 From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:17:06 +0300 Subject: [PATCH 5/6] Update livetime.js --- src/theme/livetime.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/theme/livetime.js b/src/theme/livetime.js index 61389938e3..71e777a669 100644 --- a/src/theme/livetime.js +++ b/src/theme/livetime.js @@ -4,8 +4,8 @@ var second = new Date().getSeconds(); var minute = new Date().getMinutes(); var hour = new Date().getHours(); -document.getElementById('day').innerHTML = "Current day: " + day; +document.getElementById('day').innerHTML = "Current Day: " + day; document.getElementById('unix').innerHTML = time; -document.getElementById('second').innerHTML = "Current second: " + second; -document.getElementById('minute').innerHTML = "Current minute: " + minute; -document.getElementById('hour').innerHTML = "Current hour: " + hour; +document.getElementById('second').innerHTML = "Current Second: " + second; +document.getElementById('minute').innerHTML = "Current Minute: " + minute; +document.getElementById('hour').innerHTML = "Current Hour: " + hour; From e6b90c2085a202bfaebd88c08342912fe8894536 Mon Sep 17 00:00:00 2001 From: RainbowKey <113303649+Rainb0wKey@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:19:38 +0300 Subject: [PATCH 6/6] Update setUserRoles.md --- src/bdscript/setUserRoles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bdscript/setUserRoles.md b/src/bdscript/setUserRoles.md index 691c4dafd1..2684ee4b96 100644 --- a/src/bdscript/setUserRoles.md +++ b/src/bdscript/setUserRoles.md @@ -60,4 +60,4 @@ We've reset all your roles! Now you have "Support" role. $nomention $userRoles[$authorID] ``` -> How [$userRoles[]](./userRoles.md) works? +> [How $userRoles[] works?](./userRoles.md)