21 lines
441 B
Crystal
21 lines
441 B
Crystal
module Reactions
|
|
TRIGGERS = {
|
|
"void" => ["👀"],
|
|
"cursed" => ["😳"],
|
|
"based" => ["🗿"],
|
|
"niche" => ["👀", "🗣️"]
|
|
}
|
|
|
|
def self.check_message(content : String) : Array(String)
|
|
lower = content.downcase
|
|
emojis = [] of String
|
|
|
|
TRIGGERS.each do |keyword, reactions|
|
|
if lower.matches?(/\b#{Regex.escape(keyword)}\b/)
|
|
emojis.concat(reactions)
|
|
end
|
|
end
|
|
|
|
emojis
|
|
end
|
|
end
|