diff --git a/src/index.ts b/src/index.ts index f26cf6f..f603859 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,11 +11,12 @@ client.on("ready", async () => { }); client.on("messageCreate", async (message: Message) => { - try{if (!message.author){}} catch(e) { await client.users.fetch(message.authorId) } - + try{if (!message.author) {await client.users.fetch(message.authorId)} } + catch(e){console.log(e)} + if (message.author?.bot) {} else { - if (message.content.startsWith(config.prefix)) { + if (message?.content.startsWith(config.prefix)) { commandHandler(message, config.prefix); } else {