FKLC / WhatsAppToDiscord

WhatsAppToDiscord is a Discord bot that uses WhatsApp Web as a bridge between Discord and WhatsApp.
https://fklc.github.io/WhatsAppToDiscord/
MIT License
264 stars 81 forks source link

Crashes after adding to server. If i open it again while it is in server it makes a separate control room and doesnt work nor does it register commands #181

Closed MakerOfMoon closed 10 months ago

MakerOfMoon commented 10 months ago

Describe the bug Title says it all

To Reproduce

  1. Open script, without being in any servers.
  2. Input token.
  3. Click on link to make the bot join server.
  4. Bot gets added and makes the role and control room, sends nothing in there
  5. Crashes instantly after

Expected behavior bot to start up and send the pairing qr and use the bot as normal

Logs {"level":30,"time":1705870658949,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Starting"} {"level":30,"time":1705870659451,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Update checked."} {"level":30,"time":1705870659451,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Conversion completed."} {"level":30,"time":1705870856492,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded settings."} {"level":30,"time":1705870856492,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Changed auto save interval."} {"level":30,"time":1705870856492,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded contacts."} {"level":30,"time":1705870856492,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded chats."} {"level":30,"time":1705870856492,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded last messages."} {"level":50,"time":1705870857427,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","err":{"type":"DiscordjsError","message":"Privileged intent provided is not enabled or whitelisted.","stack":"Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.\n at WebSocketManager2.createShards (C:\snapshot\WhatsAppToDiscord\out.js)\n at async Client.login (C:\snapshot\WhatsAppToDiscord\out.js)\n at async Object.start (C:\snapshot\WhatsAppToDiscord\out.js)\n at async C:\snapshot\WhatsAppToDiscord\out.js"},"msg":"Privileged intent provided is not enabled or whitelisted."} {"level":30,"time":1705870857427,"pid":808,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Exiting!"} {"level":30,"time":1705870898860,"pid":1584,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Starting"} {"level":30,"time":1705870899492,"pid":1584,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Update checked."} {"level":30,"time":1705870899492,"pid":1584,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Conversion completed."} {"level":30,"time":1705870949604,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Starting"} {"level":30,"time":1705870950090,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Update checked."} {"level":30,"time":1705870950090,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Conversion completed."} {"level":30,"time":1705871005829,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded settings."} {"level":30,"time":1705871005829,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Changed auto save interval."} {"level":30,"time":1705871005829,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded contacts."} {"level":30,"time":1705871005829,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded chats."} {"level":30,"time":1705871005829,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded last messages."} {"level":50,"time":1705871007061,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","err":{"type":"DiscordjsError","message":"Privileged intent provided is not enabled or whitelisted.","stack":"Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.\n at WebSocketManager2.createShards (C:\snapshot\WhatsAppToDiscord\out.js)\n at async Client.login (C:\snapshot\WhatsAppToDiscord\out.js)\n at async Object.start (C:\snapshot\WhatsAppToDiscord\out.js)\n at async C:\snapshot\WhatsAppToDiscord\out.js"},"msg":"Privileged intent provided is not enabled or whitelisted."} {"level":30,"time":1705871007061,"pid":20936,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Exiting!"} {"level":30,"time":1705871052034,"pid":30780,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Starting"} {"level":30,"time":1705871052514,"pid":30780,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Update checked."} {"level":30,"time":1705871052515,"pid":30780,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Conversion completed."} {"level":30,"time":1706017043219,"pid":24564,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Starting"} {"level":50,"time":1706017051300,"pid":24564,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"SIGINT"} {"level":30,"time":1706017051300,"pid":24564,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Exiting!"} {"level":50,"time":1706017051302,"pid":24564,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","err":{"type":"Error","message":"ENOENT: no such file or directory, open 'C:\Users\Ryzen-7\Desktop\software\whatsapptodiscord\storage\settings'","stack":"Error: ENOENT: no such file or directory, open 'C:\Users\Ryzen-7\Desktop\software\whatsapptodiscord\storage\settings'","errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\Users\Ryzen-7\Desktop\software\whatsapptodiscord\storage\settings"},"msg":"ENOENT: no such file or directory, open 'C:\Users\Ryzen-7\Desktop\software\whatsapptodiscord\storage\settings'"} {"level":30,"time":1706017051302,"pid":24564,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Exiting!"} {"level":30,"time":1706017109439,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Starting"} {"level":30,"time":1706017109944,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Update checked."} {"level":30,"time":1706017109944,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Conversion completed."} {"level":30,"time":1706017262240,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded settings."} {"level":30,"time":1706017262240,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Changed auto save interval."} {"level":30,"time":1706017262241,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded contacts."} {"level":30,"time":1706017262241,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded chats."} {"level":30,"time":1706017262241,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Loaded last messages."} {"level":50,"time":1706017263220,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","err":{"type":"DiscordjsError","message":"Privileged intent provided is not enabled or whitelisted.","stack":"Error [DISALLOWED_INTENTS]: Privileged intent provided is not enabled or whitelisted.\n at WebSocketManager2.createShards (C:\snapshot\WhatsAppToDiscord\out.js)\n at async Client.login (C:\snapshot\WhatsAppToDiscord\out.js)\n at async Object.start (C:\snapshot\WhatsAppToDiscord\out.js)\n at async C:\snapshot\WhatsAppToDiscord\out.js"},"msg":"Privileged intent provided is not enabled or whitelisted."} {"level":30,"time":1706017263221,"pid":9788,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Exiting!"} {"level":30,"time":1706017273021,"pid":24840,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Starting"} {"level":30,"time":1706017273582,"pid":24840,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Update checked."} {"level":30,"time":1706017273582,"pid":24840,"hostname":"DESKTOP-TTQB4RQ","version":"v0.10.25","msg":"Conversion completed."}

Platform Microsoft Windows 11 Pro AMD Ryzen 7 5800X NVIDIA ASUS ROG Strix 3060 OC (is overclocked) 4x8GB (32GB) DDR4 G.Skill Trident Z

Additional context Not Applicable

Notes If you need to contact me for any reason, please consider using Discord for a much sooner response my username is makerofmoon#0 Thanks for the support

FKLC commented 10 months ago

Are you sure that you enabled the messages intent during the setup? the issue is about that

MakerOfMoon commented 10 months ago

image yeah

MakerOfMoon commented 10 months ago

i do have disabled public bot setting though, could that be an issue?

MakerOfMoon commented 10 months ago

image i also added these and now it works, im going to close this issue