From 3ed26aa2d1692daf6ce0bcdd9face3f106af9419 Mon Sep 17 00:00:00 2001 From: Jaspalsinghchot <30924269+Jaspalsinghchot@users.noreply.github.com> Date: Fri, 6 Oct 2023 23:30:31 +0400 Subject: [PATCH] Create BowClap.js --- Parsers/BowClap.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Parsers/BowClap.js diff --git a/Parsers/BowClap.js b/Parsers/BowClap.js new file mode 100644 index 0000000..adebcff --- /dev/null +++ b/Parsers/BowClap.js @@ -0,0 +1,14 @@ +/* +activation_example:!clap your sentence +regex:!clap +flags:gmi +order:200 +stop_processing:false +*/ + +var sentence = current.text.replace(/!clap/gmi, "").trim().toUpperCase(); +if (sentence == '') { + new x_snc_slackerbot.Slacker().send_chat(current, ':upside_down_face: gimme something to clap!', true); +} else { + new x_snc_slackerbot.Slacker().send_chat(current, sentence.split(' ').join(' :clap: '), false); +}