Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variable: rolestuff
- Value: (keep empty)
- ----------------------------------------------
- 1st Command
- Trigger: (prefix)create-role
- Scripting Language: BDscript 2
- ----------------------------------------------
- $nomention
- $var[x;❌]
- $if[$checkUserPerms[$authorID;manageroles]==false]
- $addField[$var[x] Action Denied!;You don’t have the **Manage Roles** permisson]
- $addTimestamp
- $color[#eb4346]
- $deleteIn[5s]
- $async[1]
- $replyIn[5s]
- $deletecommand
- $endasync
- $elseif[$checkUserPerms[$botID;manageroles]==false]
- $addField[$var[x] Action Denied!;I don’t have the **Manage Roles** permisson]
- $addTimestamp
- $color[#eb4346]
- $else
- $resetUserVar[rolestuff]
- $title[🎨 Role Creator]
- $description[• Start by clicking the “Create Role” button]
- $addField[More Info;
- • You can keep inputs empty, though you shouldn’t with the role’s name
- • For the permissons step, you can’t put permissons you don’t have
- ]
- $color[#2f3136]
- $deletecommand
- $addButton[no;createrole-$authorID;Create Role;secondary;no;🎨]
- $addButton[no;deletemessage-$authorID;Delete Message;secondary;no;🗑]
- $endif
- ----------------------------------------------
- 2nd Command
- Trigger: $onInteraction
- Scripting Language: BDscript 2
- ----------------------------------------------
- $nomention
- $var[x;❌]
- $textSplit[$date;-]
- $var[month;$splitText[2]]
- $if[$checkContains[$customID;createrole]==true]
- $textSplit[$customID;-]
- $if[$and[$checkContains[$customID;createrole]==true;$splitText[2]!=$authorID]==true]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$checkUserPerms[$authorID;manageroles]==true]
- $newModal[rolebuilder;Role Builder]
- $addTextInput[name;short;Name;;100;yes;;The role’s name.]
- $addTextInput[color;short;Color;;6;no;;The role’s color]
- $addTextInput[display;short;Display;;3;no;;Yes / No, Display the role members separately from online members?]
- $addTextInput[mentionable;short;Mentionable;;3;no;;Yes / No, Allow anyone to @mention this role?]
- $else
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied;You don’t reach the requirments for this step.]
- $color[#eb4346]
- $footer[© $username[$botID] Development $var[month]/$day/$year]
- $endif
- $endif
- $endif
- $if[$customID==rolebuilder]
- $if[$input[display]==]
- $var[display;no]
- $elseif[$checkContains[$toLowercase[$input[display]];no]==true]
- $var[display;no]
- $elseif[$checkContains[$toLowercase[$input[display]];yes]==true]
- $var[display;yes]
- $else
- $var[display;no]
- $endif
- $if[$input[mentionable]==]
- $var[mentionable;no]
- $elseif[$checkContains[$toLowercase[$input[mentionable]];no]==true]
- $var[mentionable;no]
- $elseif[$checkContains[$toLowercase[$input[mentionable]];yes]==true]
- $var[mentionable;yes]
- $else
- $var[mentionable;no]
- $endif
- $if[$input[color]!=]
- $createRole[$input[name];$input[color];$var[display];$var[mentionable]]
- $else
- $createRole[$input[name];0;$var[display];$var[mentionable]]
- $endif
- $embedSuppressErrors[$var[x] Action Denied;You don’t reach the requirments for this step.;#eb4346;;© $username[$botID] Development $var[month]/$day/$year;]
- $title[🎨 Role Creation: Permissons]
- $description[What permissons you want <@&$findRole[$input[name]]> to have?]
- $color[#3897D9]
- $footer[You can only put the permissons you have!]
- $newSelectMenu[perms;0;12;Permissons;]
- $if[$checkUserPerms[$authorID;admin]==true]
- $addSelectMenuOption[perms;Admin;admin-$authorID-;;no;;]
- $endif
- $if[$checkUserPerms[$authorID;addreactions]==true]
- $addSelectMenuOption[perms;Add Reactions;addreactions-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;changenicknames]==true]
- $addSelectMenuOption[perms;Change Nicknames;changenicknames-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;managechannels]==true]
- $addSelectMenuOption[perms;Manage Channels;managechannels-$authorID-;;no;;]
- $endif
- $if[$checkUserPerms[$authorID;managemessages]==true]
- $addSelectMenuOption[perms;Manage Messages;managemessages-$authorID-;;no;;]
- $endif
- $if[$checkUserPerms[$authorID;managenicknames]==true]
- $addSelectMenuOption[perms;Manage Nicknames;managenicknames-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;manageroles]==true]
- $addSelectMenuOption[perms;Manage Roles;manageroles-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;manageserver]==true]
- $addSelectMenuOption[perms;Manage Server;manageserver-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;mentioneveryone]==true]
- $addSelectMenuOption[perms;Mention Everyone;mentioneveryone-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;moderatemembers]==true]
- $addSelectMenuOption[perms;Moderate Members;moderatemembers-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;readmessages]==true]
- $addSelectMenuOption[perms;Read Messages;readmessages-$authorID-;;no;]
- $endif
- $if[$checkUserPerms[$authorID;readmessagehistory]==true]
- $addSelectMenuOption[perms;Read Message History;readmessagehistory-$authorID-;;no;]
- $endif
- $deleteMessage[$channelID;$messageID]
- $endif
- $if[$customID==deletemessage-$authorID]
- $if[$checkUserPerms[$botID;managemessages]==true]
- $deleteMessage[$channelID;$messageID]
- $else
- $endif
- $endif
- ----------------------------------------------
- 3rd Command
- Trigger: $onInteraction[perms]
- Scripting Language: BDscript 2
- ----------------------------------------------
- $nomention
- $var[x;❌]
- $var[role;$replaceText[$replaceText[$getEmbedData[$channelID;$messageID;1;description];What permissons you want;;-1];to have?;;-1]]
- $var[ID;$trimSpace[$replaceText[$replaceText[$replaceText[$replaceText[$replaceText[$var[role];<;;-1];@;;-1];>;;-1];&;;-1];I’ve given;;-1]]]
- $var[roleID;$var[ID]]
- $if[$checkContains[$message;admin-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Admin] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Admin]
- $endif
- $modifyRolePerms[$var[ID];admin]
- $endif
- $endif
- $if[$checkContains[$message;addreactions-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Add Reactions] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Add Reactions]
- $endif
- $modifyRolePerms[$var[ID];admin]
- $endif
- $endif
- $if[$checkContains[$message;changenicknames-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Change Nicknames ] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Change Nicknames]
- $endif
- $modifyRolePerms[$var[ID];changenicknames]
- $endif
- $endif
- $if[$checkContains[$message;managechannels-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Manage Channels] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Manage Channels]
- $endif
- $modifyRolePerms[$var[ID];managechannels]
- $endif
- $endif
- $if[$checkContains[$message;managemessages-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Manage Messages] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Manage Messages]
- $endif
- $modifyRolePerms[$var[ID];managemessages]
- $endif
- $endif
- $if[$checkContains[$message;managenicknames-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Add Reactions] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Manage Nicknames]
- $endif
- $modifyRolePerms[$var[ID];managenicknames]
- $endif
- $endif
- $if[$checkContains[$message;manageroles-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Manage Roles] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Manage Roles]
- $endif
- $modifyRolePerms[$var[ID];manageroles]
- $endif
- $endif
- $if[$checkContains[$message;manageserver-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Manage Server] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Manage Server]
- $endif
- $modifyRolePerms[$var[ID];manageserver]
- $endif
- $endif
- $if[$checkContains[$message;mentioneveryone-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Mention Everyone] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Mention Everyone]
- $endif
- $modifyRolePerms[$var[ID];mentioneveryone]
- $endif
- $endif
- $if[$checkContains[$message;moderatemembers-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Moderate Members] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Moderate Members]
- $endif
- $modifyRolePerms[$var[ID];moderatemembers]
- $endif
- $endif
- $if[$checkContains[$message;readmessages-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Read Messages] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Read Messages]
- $endif
- $modifyRolePerms[$var[ID];readmessages]
- $endif
- $endif
- $if[$checkContains[$message;readmessagehistory-$authorID]==true]
- $textSplit[$message;-]
- $if[$splitText[2]!=$authorID]
- $ephemeral
- $removeButtons
- $addField[$var[x] Action Denied!;This button isn’t for you]
- $addTimestamp
- $color[#eb4346]
- $else
- $if[$getUserVar[rolestuff]==]
- $setUserVar[rolestuff;Read Message History] $else
- $setUserVar[rolestuff;$getUserVar[rolestuff], Read Message History]
- $endif
- $modifyRolePerms[$var[ID];readmessagehistory]
- $endif
- $endif
- $var[rolemsgID;$sendEmbedMessage[$channelID;;🎨 Role Creation: Members;;Who do you want to give <@&$var[ID]> to?
- Type `skip` if you wish to skip this step!;#ed6360;;;;;;;no;yes]]
- $if[$getUserVar[rolestuff]!=]
- $setUserVar[rolestuff;$var[rolemsgID] | $getUserVar[rolestuff]]
- $textSplit[$getUserVar[rolestuff];|]
- $if[$isNumber[$splitText[2]]==true]
- $setUserVar[rolestuff;$var[rolemsgID] | *No Permissions!*]
- $endif
- $else
- $setUserVar[rolestuff;$var[rolemsgID] | *No Permissions!*]
- $endif
- $removeComponent[perms]
- $awaitFunc[rolemembers;$authorID]
- $deleteMessage[$channelID;$messageID]
- ----------------------------------------------
- 4th Command
- Trigger: $awaitedCommand[rolemembers;]
- Scripting Language: BDscript 2
- ----------------------------------------------
- $nomention
- $var[x;❌]
- $allowMention
- $if[$checkContains[$toLowercase[$message];skip]==false]
- $textSplit[$getUserVar[rolestuff];|]
- $var[ID;$trimSpace[$replaceText[$replaceText[$replaceText[$replaceText[$replaceText[$getEmbedData[$channelID;$splitText[1];1;description];Who do you want to give;;-1];to?;;-1];<@&;;-1];>;;-1];Type `skip` if you wish to skip this step!;;-1]]]
- $var[perms;$splitText[2]]
- $var[msgID;$splitText[1]]
- $if[$mentioned[1]!=]
- $roleGrant[$mentioned[1];+$var[ID]]
- $else
- $addField[$var[x] Action Denied!;You didn’t mention anyone]
- $color[#eb4346]
- $addTimestamp
- $deleteIn[5s]
- $endif
- $if[$mentioned[1]!=]
- $if[$mentioned[2]!=]
- $roleGrant[$mentioned[2];+$var[ID]]
- $endif
- $if[$mentioned[3]!=]
- $roleGrant[$mentioned[3];+$var[ID]]
- $endif
- $if[$mentioned[4]!=]
- $roleGrant[$mentioned[4];+$var[ID]]
- $endif
- $if[$mentioned[5]!=]
- $roleGrant[$mentioned[5];+$var[ID]]
- $endif
- $if[$mentioned[6]!=]
- $roleGrant[$mentioned[6];+$var[ID]]
- $endif
- $if[$mentioned[7]!=]
- $roleGrant[$mentioned[7];+$var[ID]]
- $endif
- $if[$mentioned[8]!=]
- $roleGrant[$mentioned[8];+$var[ID]]
- $endif
- $if[$mentioned[9]!=]
- $roleGrant[$mentioned[9];+$var[ID]]
- $endif
- $if[$mentioned[10]!=]
- $roleGrant[$mentioned[10];+$var[ID]]
- $endif
- $allowMention
- $deletecommand
- $deleteMessage[$channelID;$var[msgID]]
- $title[🎨 Role Creation: Finished]
- $addField[Role;<@&$var[ID]> `[$roleName[$var[ID]]\]`;no]
- $addField[Permissons;$var[perms];no]
- $addField[Members;$message;no]
- $resetUserVar[rolestuff]
- $color[#2f3136]
- $endif
- $endif
- $endif
- $if[$checkContains[$toLowercase[$message];skip]==true]
- $textSplit[$getUserVar[rolestuff];|]
- $var[ID;$trimSpace[$replaceText[$replaceText[$replaceText[$replaceText[$replaceText[$getEmbedData[$channelID;$splitText[1];1;description];Who do you want to give;;-1];to?;;-1];<@&;;-1];>;;-1];Type `skip` if you wish to skip this step!;;1]]]
- $var[perms;$splitText[2]]
- $var[msgID;$splitText[1]]
- $title[🎨 Role Creation: Finished]
- $addField[Role;<@&$var[ID]> `[$roleName[$var[ID]]\]`;no]
- $addField[Permissons;$var[perms];no]
- $addField[Members;*No Members!*;no]
- $resetUserVar[rolestuff]
- $color[#2f3136]
- $endif
- ----------------------------------------------
- You've reached the end!
Add Comment
Please, Sign In to add comment