fix: check for bun only channel at top

This commit is contained in:
Jozef Steinhübl 2023-10-10 14:27:46 +02:00
parent 7311bc7f61
commit aef0561266
No known key found for this signature in database
GPG key ID: E944BC293F5FF7E7

View file

@ -12,6 +12,7 @@ const BUN_ONLY_CHANNEL_ID = "1161157663867027476";
defineListener({
event: Events.MessageCreate,
run: async(message: Message) => {
if (handleBunOnlyChannel(message)) return;
if (message.system || message.author.bot) return;
if (!message.content.toLowerCase().startsWith(MESSAGE_PREFIX)) return handleOthers(message);
@ -38,8 +39,6 @@ defineListener({
});
function handleOthers(message: Message) {
if (handleBunOnlyChannel(message)) return;
handleGithubLink(message);
}