Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 无法发送频道消息 #1270

Open
3 tasks done
cdwcgt opened this issue Dec 17, 2021 · 0 comments
Open
3 tasks done

[Bug]: 无法发送频道消息 #1270

cdwcgt opened this issue Dec 17, 2021 · 0 comments
Labels
bug? The issue author think this is a bug

Comments

@cdwcgt
Copy link

cdwcgt commented Dec 17, 2021

请确保您已阅读以上注意事项,并勾选下方的确认框。

  • 我已经仔细阅读上述教程和 "提问前需知"
  • 我已知晓并同意,如果我不遵循以下格式提交 Issue,或者我使用的并非最新版本,或者我没有提供足够的环境信息,我的 Issue 可能会被无条件自动关闭或/并锁定。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(这些问题应当在 Discussion 板块提出。)

go-cqhttp 版本

v1.0.0-beta8-fix2

运行环境

Windows (64)

运行架构

AMD64

连接方式

HTTP

使用协议

0 | iPad

重现步骤

使用 send_guild_channel_msg api 发送频道消息

期望的结果是什么?

成功发送频道消息

实际的结果是什么?

出现内存错误 invalid memory address or nil pointer dereference

简单的复现代码/链接(可选)

http://127.0.0.1:5700/send_guild_channel_msg?guild_id=59447951636718646&channel_id=1595024&message=%E3%80%90Twitter+%40TV%E3%82%A2%E3%83%8B%E3%83%A1%E3%80%8C%E3%82%B9%E3%83%AD%E3%83%BC%E3%83%AB%E3%83%BC%E3%83%97%E3%80%8D%E5%85%AC%E5%BC%8F%E3%80%91%E6%9B%B4%E6%96%B0%E4%BA%86%EF%BC%81%0A----------------------%0A%E5%86%85%E5%AE%B9%EF%BC%9A%0A%E3%80%90%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E6%83%85%E5%A0%B1%E3%80%91%0A%0A%E6%97%A5%E6%9C%AC%E6%9C%80%E5%A4%A7%E7%B4%9A%E3%81%AE%E9%87%A3%E3%82%8A%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E3%81%A7%E3%81%82%E3%82%8B%E3%80%8C%E9%87%A3%E3%82%8A%E3%83%95%E3%82%A7%E3%82%B9%E3%83%86%E3%82%A3%E3%83%90%E3%83%AB2022%E3%80%8D%E3%81%AB%E3%80%8C%E3%82%B9%E3%83%AD%E3%83%BC%E3%83%AB%E3%83%BC%E3%83%97%E3%80%8D%E3%81%8C%E5%8F%82%E5%8A%A0%E6%B1%BA%E5%AE%9A%F0%9F%8E%A3%0A%0A%E4%B9%85%E4%BD%8F%E7%90%B3%E3%81%95%E3%82%93%E3%80%81%E6%97%A5%E5%B2%A1%E3%81%AA%E3%81%A4%E3%81%BF%E3%81%95%E3%82%93%E3%80%81%E5%B6%BA%E5%86%85%E3%81%A8%E3%82%82%E3%81%BF%E3%81%95%E3%82%93%E3%81%AE3%E4%BA%BA%E3%81%8C%E3%83%95%E3%83%A9%E3%82%A4%E3%83%95%E3%82%A3%E3%83%83%E3%82%B7%E3%83%B3%E3%82%B0%E3%81%AB%E6%8C%91%E6%88%A6%E3%81%97%E3%81%9F%E6%98%A0%E5%83%8F%E3%82%92%E3%80%81%E9%87%A3%E3%82%8A%E3%83%95%E3%82%A7%E3%82%B9%E3%83%86%E3%82%A3%E3%83%90%E3%83%AB%E7%94%A8%E3%81%AE%E7%89%B9%E5%88%A5%E7%B7%A8%E9%9B%86%E7%89%88%E3%81%A7%E3%81%8A%E5%B1%8A%E3%81%91%E3%81%97%E3%81%BE%E3%81%99%E2%9C%A8%0A%0A%0A%0A%23slowloop%E2%80%82https%3A%2F%2Fwww.tsurifest.com%2F%0A%0A%E5%AA%92%E4%BD%93%EF%BC%9A%0A%5BCQ%3Aimage%2Cfile%3Dfile%3A%2F%2F%2FD%3A%2FTWsend%2Fdata%2Ftemp%2FFGUidVaUYAAeyNR.jpg%5D%0A----------------------%0A%E5%8E%9F%E9%93%BE%E6%8E%A5%EF%BC%9Ahttps%3A%2F%2Ftwitter.com%2Fslowloop_tv%2Fstatus%2F1469639601551667200%0A%E6%97%A5%E6%9C%9F%EF%BC%9A2021-12-11+20%3A06%3A00

日志记录(可选)

2021/12/12 13:06:18 http: panic serving 127.0.0.1:65403: runtime error: invalid memory address or nil pointer dereference
goroutine 2305 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1801 +0xb9
panic({0xaff940, 0x119f050})
runtime/panic.go:1047 +0x266
github.com/Mrs4s/MiraiGo/client.(*GuildService).SendGuildChannelMessage(0xc0000d3220, 0xd33398d7ee6436, 0x1856d2, 0xc000692320)
github.com/Mrs4s/MiraiGo@v0.0.0-20211208080234-25c67a3ee1c1/client/guild_msg.go:88 +0x5d3
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).SendGuildChannelMessage(0xc0004fe5a0, 0x3, 0x289, 0xc000692320)
github.com/Mrs4s/go-cqhttp/coolq/bot.go:388 +0x11e
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGuildChannelMessage(0xc0004fe5a0, 0xd33398d7ee6436, 0x0, {0x3, {0x0, 0x0}, {0xc00048c580, 0x289}, 0x0, 0x0, ...}, ...)
github.com/Mrs4s/go-cqhttp/coolq/api.go:707 +0x2d8
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0006215e0, {0xc000354e05, 0x16}, {0xccdd40, 0xc0005167e0})
github.com/Mrs4s/go-cqhttp/modules/api/api.go:200 +0x7e4d
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0006215e0, {0xc000354e05, 0x16}, {0xccdd40, 0xc0005167e0})
github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*httpServer).ServeHTTP(0xc000621440, {0xcd7058, 0xc00041c460}, 0xc0005be400)
github.com/Mrs4s/go-cqhttp/server/http.go:212 +0x825
net/http.serverHandler.ServeHTTP({0xc0005f0810}, {0xcd7058, 0xc00041c460}, 0xc0005be400)
net/http/server.go:2878 +0x43b
net/http.(*conn).serve(0xc0000a2c80, {0xcdc7a0, 0xc0005d6fc0})
net/http/server.go:1929 +0xb08
created by net/http.(*Server).Serve
net/http/server.go:3033 +0x4e8

补充说明(可选)

No response

@cdwcgt cdwcgt added the bug? The issue author think this is a bug label Dec 17, 2021
@cdwcgt cdwcgt changed the title [Bug]: [Bug]: 无法发送频道消息 Dec 17, 2021
@wdvxdr1123 wdvxdr1123 reopened this Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? The issue author think this is a bug
Projects
None yet
Development

No branches or pull requests

2 participants