Timeout + lift
Description
Puts a member in time out or remove their time out - Built using slash command
Trigger
/timeout
BDScript Code
$nomention
$c[────── Slash option data ──────
https://i.postimg.cc/gcsrqWvB/Bdfd1.png
https://i.postimg.cc/tCmTwNvC/Bdfd2.png
https://i.postimg.cc/28X6M79k/Bdfd3.png
https://i.postimg.cc/5Nk0TSK9/Bdfd4.png
──────────────────────────────]
$var[errorbanner;https://cdn.rickyjs.xyz/speshy/error_banner.gif]
$var[user;$message[user]]
$var[name;$username[$var[user]]]
$var[mod;$username]
$var[duration;$message[duration]]
$if[$guildID==]
$ephemeral
$addContainer[c]
$addTextDisplay[$var[error.nodm];c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$if[$guildExists[$guildID]==false]
$ephemeral
$addContainer[c]
$addTextDisplay[$var[error.invite];c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$if[$checkUserPerms[$botID;moderatemembers]==false]
$ephemeral
$addContainer[c]
$addTextDisplay[### Failed to timeout $var[name]!$var[\n]- Reason: <@$botID> is missing the `Timeout Members` permission;c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$if[$checkUserPerms[$authorID;moderatemembers]==false]
$ephemeral
$addContainer[c]
$addTextDisplay[### Failed to timeout $var[name]!$var[\n]> Reason: <@$authorID> is missing the `Timeout Members` permission!;c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$if[$var[user]==$serverOwner]
$ephemeral
$addContainer[c]
$addTextDisplay[### Failed to timeout $var[name]!$var[\n]> Reason: User is owner of $serverName[$guildID];c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$if[$var[user]==$botID]
$ephemeral
$addContainer[c]
$addTextDisplay[### Failed to timeout myself!$var[\n]> Reason: If you want me quiet, just don't use me!;c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$if[$var[user]==$authorID]
$ephemeral
$addContainer[c]
$addTextDisplay[### Failed to timeout yourself!$var[\n]> Reason: Why would you even want that? Be quiet..;c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$enableDecimals[yes]
$if[$message[lift]==true]
$if[$isTimedOut[$var[user]]==false]
$ephemeral $defer
$addContainer[c]
$addTextDisplay[[$var[name]\](https://discord.com/users/$var[user]) is not timed out;c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$defer
$addContainer[c;$var[color]]
$addTextDisplay[[$var[name]\](https://discord.com/users/$var[user]) timeout has been lifted as can now talk again!;c]
$untimeout[$var[user]]
$else
$if[$var[duration]==]
$ephemeral $defer
$addContainer[c]
$addTextDisplay[You must provide a duration if you're going to timeout [$var[name]\](https://discord.com/users/$var[user]);c]
$addMediaGallery[g1;c]
$addMediaGalleryItem[$var[errorbanner];;;g1]
$stop
$endif
$defer
$addContainer[c;$var[color]]
$addTextDisplay[[$var[name]\](https://discord.com/users/$var[user]) has been put in timeout for $numberSeparator[$var[duration]] seconds *($round[$divide[$var[duration];60];2] mins)*;c]
$timeout[$var[duration]s;$var[user]]
$endif
Copied to clipboard!