From 9ead676e3069decb60b7859a3cb08195c07bcec8 Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:39:16 +0530 Subject: [PATCH 1/4] Add page redirect script --- scripts/redirect.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 scripts/redirect.js diff --git a/scripts/redirect.js b/scripts/redirect.js new file mode 100644 index 00000000..62a8a560 --- /dev/null +++ b/scripts/redirect.js @@ -0,0 +1,42 @@ +/* + NKA (Formerly PyBotDevs) 2022. For enquiries contact PyBotDevs +*/ + +/** + * @name github + * @description Redirects to the bot's Github repository page. + */ +function github() +{ + git_author = "PyBotDevs"; + git_repo = "isobot-lazer"; + window.location = "https://github.com/" + git_author + "/" + git_repo; +} + +client_id = 953278050135588905; +/** + * @name invite + * @description Redirects to the bot's Discord OAuth2 link. + * @param {number} client_id + * @param {string} permissions + * + */ +function invite(client_id, permissions) +{ + permission_int = null; + if (permissions == "all") + { + // Default permissions configuration. Includes all bot functionality. + permission_int = 8; + } + else if (permissions == "no_moderation") + { + // Invites the bot without any moderation permissions. Useful if inviter does not have admin permissions or the bot is not going to be used for moderation. + permissions_int = 412387495233; + } + else + { + return console.warn("Argument \"permissions\" can only be \"all\" or \"no_moderation\"."); + } + window.location = "https://discord.com/api/oauth2/authorize?client_id=" + client_id + "&permissions=" + permissions_int + "&scope=bot%20applications.commands"; +} From 47fe015568dc0c7d2daac089b0cdd79cd417420e Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:42:06 +0530 Subject: [PATCH 2/4] Add support for page redirect script --- index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index b9d112cc..2b6b893e 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ Isobot lazer - The future of isobot - + @@ -36,10 +36,10 @@
- +

- +
@@ -90,4 +90,5 @@ background-color: rgb(14, 14, 14); } + From 9876e1939909f515aad7c649f98cfbc9fe498d42 Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:44:03 +0530 Subject: [PATCH 3/4] Fix resource paths --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 2b6b893e..d7082f40 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ Isobot lazer - The future of isobot - + @@ -36,10 +36,10 @@
- +

- +
From aeb8444f335bdb3463bebb518a548a2d09ac9b83 Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Thu, 14 Jul 2022 20:45:25 +0530 Subject: [PATCH 4/4] Fix a typo --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index d7082f40..dbfa0fc3 100644 --- a/index.html +++ b/index.html @@ -36,7 +36,7 @@
- +