G
G
getaxe2022-01-26 06:01:19
Node.js
getaxe, 2022-01-26 06:01:19

How to fix Uncaught TypeError: memGuild.members.get is not a function?

I downloaded the simple-discord.db library, the problem is that I got an error when connecting

Uncaught TypeError: memGuild.members.get is not a function

I found this part of the code in the library, but I can't figure out what's wrong.
bot.on('messageCreate', message => {
            if(message.guild) {
                if(!this.guilds.get(message.guild.id)) this.guilds.add(message.guild);
                const memGuild = this.guilds.get(message.guild.id,false);
                console.log(memGuild);
                if(!memGuild.members.get(message.author.id)&&message.member) memGuild.members.add(message.member);
                if(!this.users.get(message.author.id)&&message.author) this.users.add(message.author);
            }
        });

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question