a guest Aug 23rd, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. discord command tempmute <member> [<string>] [<timespan>]:
  2.     description: <STAFF>Temporarily mute a user by ID or by a direct mention, must include a timespan and a reason.
  3.     usage: tempmute <user id|direct mention|name##discriminator> <reason> <timespan>
  4.     prefixes: .
  5.     executable in: guild
  6.     bots: StormMC
  7.     trigger:
  8.         if f event-member has role name "":
  9.             if arg-2 is not set:
  10.                 needReason(event-message, event-channel)
  11.                 stop
  12.             if arg-3 is not set:
  13.                 sendMessage("You must include a amount of time to mute the user for", event-channel, event-message)
  14.                 stop
  15.             set {_roles::*} to roles of arg-1
  16.             if {_roles::*} contains {mutedRole}:
  17.                 sendMessage("That user is already muted", event-channel, event-message)
  18.                 stop
  19.             add {mutedRole} to roles of arg-1
  20.             set {_error} to the last vixio error
  21.             if permCheck({_error}):
  22.                 sendMessage("I ran into an error! `%{_error}%`", event-channel, event-message)
  23.                 stop
  24.             if {punishment::tempmute::%arg-1%::count} is not set:
  25.                 set {punishment::tempmute::%arg-1%::count} to 1
  26.             else:
  27.                 add 1 to {punishment::tempmute::%arg-1%::count}
  28.             set {_count} to {punishment::tempmute::%arg-1%::count}
  29.             set {punishment::tempmute::%arg-1%::%{_count}%::reason} to arg-2
  30.             set {punishment::tempmute::%arg-1%::%{_count}%::length} to arg-3
  31.             set {tempMute::%arg-1%} to arg-1
  32.             set {tempMute::%arg-1%::length} to arg-3
  33.             set {tempMute::%arg-1%::time} to now
  34.             set {evaders::%arg-1%} to true
  35.             send "You have been temporarily muted for `%arg-2%`, the length of the temp mute is `%arg-3%`." to arg-1 with event-bot
  36.             sendMessage("I have successfully muted %arg-1%##%discriminator of arg-1% for %arg-3%", event-channel, event-message)
  37.             set {_m} to a new message builder
  38.             append line "**-=Temp-Mute=-**" to {_m}
  39.             append line "**User**: %arg-1%##%discriminator of arg-1% (%id of arg-1%)" to {_m}
  40.             append line "**Reason**: %arg-2%" to {_m}
  41.             append line "**Amount of time**: %arg-3%" to {_m}
  42.             append line "**Responsible Moderator**: %event-user%##%discriminator of event-user%" to {_m}
  43.             sendLog({_m})
  45. # Event to un-mute people who are temp-muted
  46. every minute:
  47.     loop {tempMute::*}:
  48.         set {_length} to {tempMute::%loop-index%::length}
  49.         set {_time} to {tempMute::%loop-index%::time}
  50.         set {_difference} to "%difference between {_time} and now%"
  51.         if difference between {tempMute::%loop-index%::time} and now is more than {tempMute::%loop-index%::length}:
  52.             wait 3 seconds
  53.             remove {mutedRole} from roles of {tempMute::%loop-index%} in guild of {channel} with "StormMC"
  54.             delete {tempMute::%loop-index%::*}
  55.             delete {tempMute::%loop-index%}
  56.             delete {evaders::%loop-index%}
  57.     loop discord members of {guild}:
  58.         delete {_roles::*}
  59.         if bot state of loop-member is false:
  60.             set {_roles::*} to roles of loop-member
  61.             if {_roles::*} is not set:
  62.                 add 1 to {_count}
  63.                 add {whiteIsBoring} to roles of loop-member with "StormMC"
  64.             else if {_roles::*} does not contain {whiteIsBoring}:
  65.                 add 1 to {_count}
  66.                 add {whiteIsBoring} to roles of loop-member with "StormMC"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!