Advertisement
StaffVanish

BDFD - Ban new account age

Mar 1st, 2024
1,152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.99 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.  
  8.  
  9.  
  10. $c[Code to count account age]
  11.  
  12. $c[1. Change userID to timestamp]
  13.  
  14. $var[timestamp;$calculate[($authorID / 4194304 + 1420070400000) / 1000]]
  15.  
  16. $c[2. Change timestamp to time second now]
  17.  
  18. $var[second;$sub[$getTimestamp;$var[timestamp]]]
  19.  
  20. $c[3. Change second to day time]
  21.  
  22. $var[age;$calculate[$var[second] / 86400]]
  23.  
  24. $c[4. Check if account is less or equal to the specified account age]
  25.  
  26. $if[$var[age]<=$var[day]]
  27.  
  28. $c[5. Ban them]
  29. $banID[$cropText[$var[reason];500;];$authorID]
  30.  
  31. $c[Add another code above here, if you want a ban dm message or log]
  32.  
  33. $c[Example:]
  34.  
  35. $if[$isUserDMEnabled[$authorID]==true]
  36. $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]
  37. $endif
  38.  
  39. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement