Created
June 14, 2024 12:07
-
-
Save VillainsRule/c7366c51d6a9788de4c3ee66c1f3b87c to your computer and use it in GitHub Desktop.
blacket guess the blook automator!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let lowerCaseBlooks = {}; | |
Object.keys(blacket.blooks).forEach((blook) => { | |
lowerCaseBlooks[blook.toLowerCase()] = blacket.blooks[blook]; | |
}); | |
blacket.socket.on('messages-create', (m) => { | |
let content = m.data.message.content; | |
if (content.match(/\[([^\]]+)\]/g)) { | |
let match = content.replace(/\[([^\]]+)\]/g, (match, blook) => { | |
if (!m.data.author.permissions.includes("use_blook_emojis")) return; | |
if (!lowerCaseBlooks[blook.toLowerCase()]) return; | |
return setTimeout(() => blacket.sendMessage(0, blook.toLowerCase()), 500); | |
}); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🔥