fix: Crash p2

This commit is contained in:
Ale 2023-09-04 10:57:25 +02:00
parent 6dc0f3ca8d
commit 6574d2af48
No known key found for this signature in database
GPG key ID: 284AFB134BB2E07D

View file

@ -11,7 +11,10 @@ client.on("ready", async () => {
});
client.on("messageCreate", async (message: Message) => {
if (message.author.bot) {}
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)) {
commandHandler(message, config.prefix);