mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-22 14:41:05 +01:00
fix: check for bun only channel at top
This commit is contained in:
parent
7311bc7f61
commit
aef0561266
1 changed files with 1 additions and 2 deletions
|
@ -12,6 +12,7 @@ const BUN_ONLY_CHANNEL_ID = "1161157663867027476";
|
||||||
defineListener({
|
defineListener({
|
||||||
event: Events.MessageCreate,
|
event: Events.MessageCreate,
|
||||||
run: async(message: Message) => {
|
run: async(message: Message) => {
|
||||||
|
if (handleBunOnlyChannel(message)) return;
|
||||||
if (message.system || message.author.bot) return;
|
if (message.system || message.author.bot) return;
|
||||||
|
|
||||||
if (!message.content.toLowerCase().startsWith(MESSAGE_PREFIX)) return handleOthers(message);
|
if (!message.content.toLowerCase().startsWith(MESSAGE_PREFIX)) return handleOthers(message);
|
||||||
|
@ -38,8 +39,6 @@ defineListener({
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleOthers(message: Message) {
|
function handleOthers(message: Message) {
|
||||||
if (handleBunOnlyChannel(message)) return;
|
|
||||||
|
|
||||||
handleGithubLink(message);
|
handleGithubLink(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue