-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from Rainb0wKey/patch-15
$setUserRoles[] + $hour update
- Loading branch information
Showing
3 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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[] works?](./userRoles.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |