Asgarrrr / Luna

An adorable discord bot fully customizable created in javascript, using Discord.js and mongoDB that is constantly growing !
https://lunadoc.vercel.app/
GNU General Public License v3.0
24 stars 3 forks source link

TypeError: client.resolveUser is not a function #17

Closed MilkFlavor closed 3 years ago

MilkFlavor commented 3 years ago

This only happens in 4 scripts : unban, avatar, ban, kick

TypeError: client.resolveUser is not a function at Avatar.run (/home/user/Downloads/Luna/Commands/General/avatar.js:36:35) at Message.run (/home/user/Downloads/Luna/Events/message.js:97:17) at Luna. (/home/user/Downloads/Luna/Structures/Luna.js:101:60) at Luna.emit (node:events:378:20) at MessageCreateAction.handle (/home/user/Downloads/Luna/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (/home/user/Downloads/Luna/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (/home/user/Downloads/Luna/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31) at WebSocketShard.onPacket (/home/user/Downloads/Luna/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22) at WebSocketShard.onMessage (/home/user/Downloads/Luna/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10) at WebSocket.onMessage (/home/user/Downloads/Luna/node_modules/ws/lib/event-target.js:132:16)

![Screenshot_20210221_223756] (https://user-images.githubusercontent.com/55917261/108653846-85487700-7495-11eb-9071-519c6bc1d71a.png)

MilkFlavor commented 3 years ago

I don't want to be picky or anything. I just got these errors. I don't want to be annoying either. lol

Asgarrrr commented 3 years ago

No, on the contrary, thank you, I'm a bit dumb on the edges, I change and things and I forget to change the rest! I thank you for that! I am in the process of making the necessary changes to make everything work!

MilkFlavor commented 3 years ago

@Asgarrrr I got it const user = await client.users.cache.get(args[0]) || message.author;

I replaced "client.resolveUser()" with "client.users.cache.get()"

Just replace these and (for me at least) it works.

Asgarrrr commented 3 years ago

Normally, everything should be good, thanks for your feedback, I was able to discover and solve other little things.

MilkFlavor commented 3 years ago

Damn i thought I solved it... ur too gud