Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Trigger: $onJoined[channelID]
- Script Language: BDScript 2
- Code:
- $nomention
- $var[day;30] $c[<= You can change the day of account age]
- $var[reason;Account is to young] $c[<= Ban reason (optional)]
- $c[Code to count account age]
- $c[1. Change userID to timestamp]
- $var[timestamp;$calculate[($authorID / 4194304 + 1420070400000) / 1000]]
- $c[2. Change timestamp to time second now]
- $var[second;$sub[$getTimestamp;$var[timestamp]]]
- $c[3. Change second to day time]
- $var[age;$calculate[$var[second] / 86400]]
- $c[4. Check if account is less or equal to the specified account age (and they doesn't have a avatar)]
- $if[$or[$var[age]<=$var[day];$and[or[$var[age]<=$var[day];$checkContains[$authorAvatar;https://cdn.discordapp.com/embed/avatars/]==true]==true]]
- $c[5. Ban them]
- $banID[$cropText[$var[reason];500;];$authorID]
- $c[Add another code above here, if you want a ban dm message or log]
- $c[Example:]
- $if[$isUserDMEnabled[$authorID]==true]
- $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]
- $endif
- $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement