MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / DelGroupNotice

Method DelGroupNotice

client/operation.go:1254–1270  ·  view source on GitHub ↗

DelGroupNotice 删除群公告

(groupUin uint32, fid string)

Source from the content-addressed store, hash-verified

1252
1253// DelGroupNotice 删除群公告
1254func (c *QQClient) DelGroupNotice(groupUin uint32, fid string) error {
1255 bkn, err := c.GetCsrfToken()
1256 if err != nil {
1257 return err
1258 }
1259 body := fmt.Sprintf(`fid=%s&qid=%v&bkn=%v&ft=23&op=1`, fid, groupUin, bkn)
1260 req, err := http.NewRequest(http.MethodPost, "https://web.qun.qq.com/cgi-bin/announce/del_feed", strings.NewReader(body))
1261 if err != nil {
1262 return err
1263 }
1264 resp, err := c.SendRequestWithCookie(req)
1265 if err != nil {
1266 return err
1267 }
1268 defer resp.Body.Close()
1269 return nil
1270}
1271
1272// SetAvatar 设置头像
1273func (c *QQClient) SetAvatar(avatar io.ReadSeeker) error {

Callers

nothing calls this directly

Calls 3

GetCsrfTokenMethod · 0.95
SendRequestWithCookieMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected