Advertisement
BDFD_Berk

[1/2] "!poll" command | Poll system for Bot Designer For Discord!

Feb 15th, 2023
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. $nomention
  2.  
  3. $c[ Join https://dsc.gg/codes | The place where you can share and get codes, ask for codes and get support from other BDFD Developers, we also have a Bot Labs server where you can add your bot, join us! :) ]
  4.  
  5. $c[ Below, the limiters of who can start polls, you can change it to anything you wish fits best to you, it's always recommended to keep it as staff-only and trusted users since polls can be sent to any channel, avoid modifying it if you don't know how onlyPerms works. ]
  6.  
  7. $c[ This part below adds a bypass for members that has a role called "Polls Manager" ]
  8. $try
  9. $if[$roleExists[$findRole[Polls Manager]]==true]
  10. $if[$hasRole[$authorID;$findRole[Polls Manager]]==true]
  11. $var[bypass;true]
  12. $endif
  13. $endif
  14. $endtry
  15.  
  16. $c[ This part below determines the default permission needed to start polls, as default it's "managemessages", you can change it to any valid perm you wish. ]
  17. $if[$var[bypass]!=true]
  18. $onlyPerms[managemessages;**$username** You need `manage_messages` permissions to start a poll!]
  19. $endif
  20.  
  21. $varExistError[poll_system;Hello! If you are $username[$botID]'s Developer, remember this system needs a variable to work, please create the variable `poll_system` with an empty value, and this error will disappear.
  22. If you still need help, join https://dsc.gg/codes]
  23.  
  24. $if[$serverChannelExists[$mentionedChannels[<]]==true]
  25. $var[msg;:bar_chart: Your poll settings now include the channel ID for <#$mentionedChannels[<]>, which you have successfully selected.]
  26. $else
  27. $var[msg;:bar_chart: This setup allows you to tailor the poll to your specific needs and preferences.]
  28. $endif
  29.  
  30. $setUserVar[poll_system;;$authorID]
  31.  
  32. $title[Poll setup]
  33.  
  34. $description[> $var[msg]]
  35. $addField[Settings;Access the **Settings** panel to customize various aspects of your poll, including voting options, title, and description.]
  36. $addField[Send Poll;Upon finishing the setup of your poll, press the **Send Poll** button to initiate the voting process.]
  37.  
  38. $addButton[no;poll_settings-$authorID-$mentionedChannels[<];Settings;primary;no;;]
  39. $addButton[no;poll_send-$authorID;Send Poll;success;no;;]
  40.  
  41. $color[#5865f2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement