fklc / whatsapptodiscord Goto Github PK
View Code? Open in Web Editor NEWWhatsAppToDiscord is a Discord bot that uses WhatsApp Web as a bridge between Discord and WhatsApp.
Home Page: https://fklc.github.io/WhatsAppToDiscord/
License: MIT License
WhatsAppToDiscord is a Discord bot that uses WhatsApp Web as a bridge between Discord and WhatsApp.
Home Page: https://fklc.github.io/WhatsAppToDiscord/
License: MIT License
when i put the bot token in the exe it doesn't do anything
Session couldn't restored. error decoding login connResp: json: cannot unmarshal array into Go value of type map[string]interface {}
. Going to create a new session!
i don't know why but after doing all steps the commands does not work
plz help
i tried running WA2DC.exe as admin but nothing changed
is this because of awast antivirus
Hi there,
This is a new kind of error that I keep on receiving since yesterday. Here the log
2020-12-24T13:12:12.436624+00:00 app[worker.1]: [heroku-exec] Starting
2020-12-24T13:12:51.371350+00:00 app[worker.1]: Bot is now running. Press CTRL-C to exit.
2020-12-24T13:13:28.883370+00:00 app[worker.1]: error processing data: received invalid data
2020-12-24T13:13:32.690223+00:00 app[worker.1]: error processing data: received invalid data
2020-12-24T13:13:34.612351+00:00 app[worker.1]: error processing data: received invalid data
2020-12-24T13:50:43.751748+00:00 app[worker.1]: panic: HTTP 413 Request Entity Too Large, {"message": "Request entity too large", "code": 40005}
2020-12-24T13:50:43.751760+00:00 app[worker.1]:
2020-12-24T13:50:43.751799+00:00 app[worker.1]: goroutine 1403 [running]:
2020-12-24T13:50:43.751810+00:00 app[worker.1]: main.handleMediaMessage(0xc002b505a0, 0x20, 0xc002b504e0, 0x1d, 0x0, 0x0, 0x0, 0x5fe49cb1, 0x0, 0x0, ...)
2020-12-24T13:50:43.751811+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:450 +0x6fc
2020-12-24T13:50:43.751839+00:00 app[worker.1]: main.waHandler.HandleVideoMessage(0xc002b505a0, 0x20, 0xc002b504e0, 0x1d, 0x0, 0x0, 0x0, 0x5fe49cb1, 0x0, 0x0, ...)
2020-12-24T13:50:43.751855+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:475 +0x1da
2020-12-24T13:50:43.751871+00:00 app[worker.1]: created by github.com/Rhymen/go-whatsapp.(*Conn).handleWithCustomHandlers
2020-12-24T13:50:43.751887+00:00 app[worker.1]: /tmp/codon/tmp/cache/go-path/pkg/mod/github.com/!rhymen/[email protected]/handler.go:222 +0x1068
2020-12-24T13:50:43.806782+00:00 heroku[worker.1]: Process exited with status 2
2020-12-24T13:50:43.845819+00:00 heroku[worker.1]: State changed from up to crashed
2020-12-24T13:50:43.849375+00:00 heroku[worker.1]: State changed from crashed to starting
2020-12-24T13:50:44.961847+00:00 heroku[worker.1]: Starting process with command `bin/WhatsAppToDiscord`
2020-12-24T13:50:45.660477+00:00 heroku[worker.1]: State changed from starting to up
2020-12-24T13:50:48.829393+00:00 app[worker.1]: [heroku-exec] Starting
2020-12-24T13:55:52.568543+00:00 app[worker.1]: panic: interface conversion: interface {} is nil, not string
2020-12-24T13:55:52.575503+00:00 app[worker.1]:
2020-12-24T13:55:52.585066+00:00 app[worker.1]: goroutine 1 [running]:
2020-12-24T13:55:52.585796+00:00 app[worker.1]: github.com/Rhymen/go-whatsapp.(*Conn).Login(0xc000448ee0, 0xc000225ec0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
2020-12-24T13:55:52.585994+00:00 app[worker.1]: /tmp/codon/tmp/cache/go-path/pkg/mod/github.com/!rhymen/[email protected]/session.go:234 +0x23cf
2020-12-24T13:55:52.586103+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.586284+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:344 +0x11c
2020-12-24T13:55:52.586412+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.586615+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.586698+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.586927+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.586992+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.587228+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.587327+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.587491+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.587622+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.587843+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.587905+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.588127+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.588197+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.588379+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.588462+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.588647+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.588729+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.588919+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.589003+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.589190+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.589274+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.589465+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.589567+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.589736+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.589838+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.590013+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.590117+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.590286+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:347 +0x267
2020-12-24T13:55:52.590387+00:00 app[worker.1]: main.connectToWhatsApp()
2020-12-24T13:55:52.590554+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:325 +0x4d1
2020-12-24T13:55:52.590656+00:00 app[worker.1]: main.initializeWhatsApp()
2020-12-24T13:55:52.590830+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:312 +0xc4
2020-12-24T13:55:52.590933+00:00 app[worker.1]: main.main()
2020-12-24T13:55:52.591127+00:00 app[worker.1]: /tmp/build_847ed84c/WA2DC.go:89 +0xea
2020-12-24T13:55:52.687290+00:00 heroku[worker.1]: Process exited with status 2
2020-12-24T13:55:52.743424+00:00 heroku[worker.1]: State changed from up to crashed
Merry Christmas!
I am added to almost 100 groups. I receive like 1k msgs every day. I don't want notifications for all of them on discord 😬. Want blacklist feature as well🙏
I followed the installation instructions to get it installed and added to my server but the bot keeps jumping from being online to offline, does not respond to any commands and I have no idea how to connect it to Whatsapp web. Please provide better instructions on how to do this.
congratulate you because your app is great.
In the title I was wrong because if it connects, just don't let this app die, because it's great.
I'm trying to get it on my raspberry pi but I can't get it to work at all. It always says "this is your first run".
is it possible to load all the messages that were sent previously from a WhatsApp group?
First of all, thanks for all your hard work. You always try to work on my ideas and fix stuff as fast as you can.
So, I have some ideas. I know you're a busy guy, I've seen your answer to that other guy, but I don't know how to code in GO, so for now I'll leave these suggestions to you, and you can try to do it IF you want WHEN you want.
Add a help command;
Implement the message text (if there is any) when images are sent (as of now the images are shown without the message text);
Implement replies. Something like:
if (the message is a reply to another message) then
embed this other message text in the current message;
Implement sticker support (as of now stickers are not shown);
Implement mentions with the @ symbol (this one I imagine it will be harder than the others to implement, if it's even possible).
That's it. With these implementations the bot would be perfect.
Not an issue per se, but I wanted to know if there's a way I can make this only pull messages from particular chats (i.e., groups or DMs) only.
Please make it, so that 1st, nicknames can be also displayed(I got blamed bc in the whatsapp group was the message [SmallPP] thx)
And an other thing, bc im using my main whatsapp account for the bridge, my message dont appear, maybe you could tweak it a bit, so that there is a setting, that only when a message with "[" starts, it will be send! That way, my message will appear, and there will be NO infinty loop
question is it possible to run this on heroku? if so how can I do it
The bot was running smooth for a while but then I got hit by this, tried to figure out the issue but couldn't find out why.
I have a shell in a 24/7 server whit ubuntu 20.04 server headless, is it posible to host this bot in there?
log.Panicln(0xc0000c3c88, 0x1, 0x1)
log/log.go:365 +0xb7
main.handlePanic(...)
command-line-arguments/WA2DC.go:735
main.getOrCreateChannel(0x9d0635, 0xf, 0x0)
command-line-arguments/WA2DC.go:617 +0x1e5
main.dcCommandStart(0xc0001dac30, 0x3, 0x3)
command-line-arguments/WA2DC.go:251 +0x35d
main.dcOnMessageCreate(0xc0000dab40, 0xc0003000f0)
command-line-arguments/WA2DC.go:212 +0x372
github.com/bwmarrin/discordgo.messageCreateEventHandler.Handle(0x9ee8f8, 0xc0000dab40, 0x944400, 0xc0003000f0)
github.com/bwmarrin/[email protected]/eventhandlers.go:497 +0x52
created by github.com/bwmarrin/discordgo.(*Session).handle
github.com/bwmarrin/[email protected]/event.go:171 +0x118
Bot is now running. Press CTRL-C to exit.
After clicking enter, the URL doesn't appear
edit it does work
I'm having a lot of problems to even make it to work most of the times. I got this problem
Timed out. Please rescan QR Code. error decoding login resp: json: cannot unmarshal array into Go value of type map[string]interface {}
But is a bit strange sometimes works fine without any issue.
I'm not sure why this happens at all.
Hope you can help me.
Have a nice day!
support for the multi-device beta would be great
https://faq.whatsapp.com/general/download-and-installation/about-multi-device-beta/?lang=en
so i followd the totourial and stuff and the bot sent me a qr code that I scanned with Whatsapp web thing, it didn't work....?
I'd like to know if it is possible to only use one chat. I'm running a small D&D Server with a few friends and discord is very bad at notifying everyone if a channel is updated. I'd like to use this Bot to to send quick notifications in our whatsapp Group from discord whenever I updated something. Is it possible to only use one chat without the others popping up?
Hi,
this is a nice and usefull project but i wish it will run at Linux for Example at Raspberry OS at Raspberry Pi.
thx
I did everything the tutorial said and it let me scan a QR code but it crashes now every time I start up the program.
Every time my phone/ server lose connection the bot start spamming all the messages again.
Whenever a picture or a file containing no additional message is sent in whatsapp the bot crashes:
panic: HTTP 400 Bad Request, {"message": "Cannot send an empty message", "code": 50006}
goroutine 55 [running]:
main.handleMediaMessage(0xc0001fc600, 0x14, 0xc0001fc5e0, 0x1b, 0x0, 0x0, 0x0, 0x5f2134e2, 0x0, 0x0, ...)
command-line-arguments/WA2DC.go:338 +0x2e0
main.waHandler.HandleDocumentMessage(0xc0001fc600, 0x14, 0xc0001fc5e0, 0x1b, 0x0, 0x0, 0x0, 0x5f2134e2, 0x0, 0x0, ...)
command-line-arguments/WA2DC.go:372 +0x121
created by github.com/Rhymen/go-whatsapp.(*Conn).handleWithCustomHandlers
github.com/Rhymen/[email protected]/handler.go:242 +0xdb1
While I understand the bot doesn't send pictures or files, maybe it should at least not crash at this event or send a message saying [file]
Sorry to reach out to you in that way!
I am struggling with the features advertised.
I just installed everything and I can receive messages, but where can I use the commands? The console does not accept any, and in the control-room my commands would not be recognized. Am I missing anything?
After one point the CPU usage becomes full and I am unable to start another chat. Also is it possible to close a chat after sending a message.
exactly as the title mentioned,
i use my own laptop to keep the bot running (ofc using the exe that you compiled)
when i leave my laptop for a while, suddenly i see that the program itself is gone, and i have to reopen it again
any tips / suggestions ?
There's nothing much to say. Yesterday I installed the bot on my Discord server, for me and my friends, whitelisted only one chat and kept it there in the background. I wake up today with my drive full...
This is not an issue, it's more of an idea.
The thing is, I create the chat and whitelist it, and then I wanna move it to a different category, and that works fine, no problem, it still works in that category. But if I close the program and reopen it, it will look for the chat inside the default category and doesn't find it, so it creates another one.
You could make it remember the category for each individual chat, or make the program search the entire server. It would be perfect.
Thanks in advance for the attention.
Hi there, so I was playing around with your tool. I discovered that every time the session times out, all chats are gone. Is that intended behaviour? Or is my bot missing some permissions?
Hi there, im a beginner in coding tbh. I've been working on a Discord server lately and I needed a script to bring one of my whatsapp groups to one of my server channel. You have done a really great job with this script mate. As of registering this issue i have one problem with your script. Im having to run the bot locally due to which it cannot be online 24/7. The messages that are sent while the script is not running are not synced back to the channel when i start the script again. I request you to try to make it so that the old messages get synced when i run the script. Please let me know whether it is possible.
Yours sincerely,
Hyper Smartian
So i downloaded this and it works amazing man!!! thank you so much for this project
i notice a few bugs that i will be really happy if you fix
Attachments are not being sent as files/images
(when you send it from discord the user on whatsapp will see the link for the file/image)
Whatsapp & Discord Stickers are not being sent (depends on the client side)
sending from whatsapp to discord: Not sending at all
sending from discord to whatsapp: Shows Empty message
When the WA2DC window it's closed the bot stops working. Still the bot works fantastic.
goroutine 3708 [running]:
log.Panicln(0xc0000b9e00, 0x1, 0x1)
log/log.go:365 +0xb7
main.handlePanic(...)
command-line-arguments/WA2DC.go:730
main.waSendMessage(0xc000251240, 0x1b, 0xc000006120)
command-line-arguments/WA2DC.go:418 +0x34a
main.dcOnMessageCreate(0xc0000d6b40, 0xc000006120)
command-line-arguments/WA2DC.go:230 +0x191
github.com/bwmarrin/discordgo.messageCreateEventHandler.Handle(0xcae8b8, 0xc0000d6b40, 0xc04400, 0xc000006120)
github.com/bwmarrin/[email protected]/eventhandlers.go:497 +0x52
created by github.com/bwmarrin/discordgo.(*Session).handle
github.com/bwmarrin/[email protected]/event.go:171 +0x118
Bot is now running. Press CTRL-C to exit.
panic: sending message timed out
goroutine 2230 [running]:
log.Panicln(0xc000125e00, 0x1, 0x1)
log/log.go:365 +0xb7
main.handlePanic(...)
command-line-arguments/WA2DC.go:730
main.waSendMessage(0xc0000541a0, 0x1b, 0xc0000ce028)
command-line-arguments/WA2DC.go:418 +0x34a
main.dcOnMessageCreate(0xc0000dab40, 0xc0000ce028)
command-line-arguments/WA2DC.go:230 +0x191
github.com/bwmarrin/discordgo.messageCreateEventHandler.Handle(0xcae8b8, 0xc0000dab40, 0xc04400, 0xc0000ce028)
github.com/bwmarrin/[email protected]/eventhandlers.go:497 +0x52
created by github.com/bwmarrin/discordgo.(*Session).handle
github.com/bwmarrin/[email protected]/event.go:171 +0x118
Bot is now running. Press CTRL-C to exit.
Don't really know what this is but it makes the script crash. Hopefully you can figure it out
For some reason, as soon as I move out of the default category it doesn't work anymore. When I get a new message it recreates the chat inside the category.
I only see windows binaries, can you provide linux ones?
Thanks for your hard work on this. Its really useful..
v0.3.3 triggered my antivirus... Any ideas why that would be?
any way to remove the status (stories) from whatsapp?
Mc afee blocks the file and when i add it to the Whitelist and execute it, then its stopped directly by Mcafee... idk how to fix it and why is it blocked???
Im using this at the moment for a bridge between our whatsapp class and our discord class group.
Would it be possible that messages from users in the discord appear in front of the message (Like [DAM] Hi)?
1: i am hosting this on my own server and it contantly shows me as "online" in whatsapp wich is a bit wierd for others if you not respond while you are "online".
2: if i open whatsapp web on another device or the bot loses connection the bot goes haywire and spams all of my chats in discord.
Hello, again I just fund since in the updated dependencies all the media stop work like it was working before like you send a Picture into Discord to Whatsapp now only show the link not the actual photo like before.
Audio seems to work fine Files, and Pictures are only the issue.
I think I see the example on go-whatsapp there is some validation now to receive both types of files
I don't now exactly.
I'm complete new on Golang.
Thanks for this awesome bot again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.