Open Ron-zs opened 2 years ago
What branch are you using? (dev is the up to date, recommend trying that) What version of golang are you using? @Ron-zs
Was this ever resolved? i am having the same problem on both dev branch and main branch.
I have tried go version 1.20 and 1.18, I will try some other versions to see if that helps. I will be trying 1.17 next since thats in the go.mod file.
@emmaunel what go version are you using to compile the binary?
Its this line thats failing:
message, _ := dg.ChannelMessageSend(channelID.ID, sendMessage)
and I believe it is because the line prior to it is also failing:
channelID, _ = dg.GuildChannelCreate(util.ServerID, newAgent.IP, 0)
If changing the go version does not work, i will start troubleshooting as I noticed this part does not have much error handling, I can add some and commit it when i have some time :)
Edit:
Added some error handling and got this message
error creating Discord channel, HTTP 403 Forbidden, {"message": "Missing Permissions", "code": 50013}
re-added the bot with full Administrator permissions and it fixed it, now im solving the problem of the agents "not returning anything"
└─# ./linux-agent panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6ae669]
goroutine 1 [running]: main.main() /home/kali/Desktop/DiscordGo/cmd/agent/main.go:63 +0x449
I want to get the reason ,why this happend and how to resolve it. Can you help me?