Advertisement
CoolLord22

Untitled

Jul 30th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. {{/*Check if the message they sent was ok (added more case matching stuff lol) */}}
  2. {{if or (eq .Message.Content "ok") (eq .Message.Content "OK") (eq .Message.Content "Ok") (eq .Message.Content "oK")}}
  3.  
  4. {{/*If they entered ok and they have a msg1, delete the message from the channel and remove their db storage */}}
  5. {{$x := dbGet .User.ID "msg1"}}
  6. {{if $x}}
  7. {{deleteMessage CHANNEL_ID_HERE $x.Value 0}}
  8. {{dbDel .User.ID "msg1"}}
  9. {{end}}
  10. {{/*Same with msg2 */}}
  11. {{$y := dbGet .User.ID "msg2"}}
  12. {{if $y}}
  13. {{deleteMessage CHANNEL_ID_HERE $y.Value 0}}
  14. {{dbDel .User.ID "msg2"}}
  15. {{end}}
  16. {{/*Remove the role so the channel disappears */}}
  17. {{removeRoleID ROLE_ID_HERE}}
  18. {{end}}
  19. {{deleteMessage CHANNEL_ID_HERE .Message.ID 0}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement