Advertisement
StaffVanish

BDFD - Ban new account (and they doesn't have a avatar)

Mar 4th, 2024
853
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 1.10 KB | Source Code | 0 0
  1. Trigger: $onJoined[channelID]
  2. Script Language: BDScript 2
  3. Code:
  4. $nomention
  5. $var[day;30] $c[<= You can change the day of account age]
  6. $var[reason;Account is to young] $c[<= Ban reason (optional)]
  7. $c[Code to count account age]
  8. $c[1. Change userID to timestamp]
  9. $var[timestamp;$calculate[($authorID / 4194304 + 1420070400000) / 1000]]
  10. $c[2. Change timestamp to time second now]
  11. $var[second;$sub[$getTimestamp;$var[timestamp]]]
  12. $c[3. Change second to day time]
  13. $var[age;$calculate[$var[second] / 86400]]
  14. $c[4. Check if account is less or equal to the specified account age (and they doesn't have a avatar)]
  15. $if[$or[$var[age]<=$var[day];$and[or[$var[age]<=$var[day];$checkContains[$authorAvatar;https://cdn.discordapp.com/embed/avatars/]==true]==true]]
  16. $c[5. Ban them]
  17. $banID[$cropText[$var[reason];500;];$authorID]
  18. $c[Add another code above here, if you want a ban dm message or log]
  19. $c[Example:]
  20. $if[$isUserDMEnabled[$authorID]==true]
  21. $channelSendMessage[$dmChanelID[$authorID;Hi <@$authorID>, your account is to young, you have to wait **$sub[$var[day];$var[age]] Day** to join this server again]
  22. $endif
  23. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement