We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The text was updated successfully, but these errors were encountered:
@37Vision 找了一圈没看到, 就写了个直接发HTTP请求的
func SendPicToDirectMsg(guildId string, qrContent []byte, data map[string]string) ([]byte, error) { resp, err := resty.New().R().SetContext(ctx).SetAuthScheme("Bot"). SetAuthToken(strconv.FormatUint(botToken.AppID, 10)+"."+botToken.AccessToken). SetFormData(data). SetFileReader("file_image", "qrcode.png", bytes.NewReader(qrContent)). SetContentLength(true). SetResult(dto.Message{}). SetPathParam("guild_id", guildId). Post(fmt.Sprintf("%s://%s%s", "https", "api.sgroup.qq.com", "/dms/{guild_id}/messages")) if err != nil { return nil, err } return resp.Body(), nil }
Sorry, something went wrong.
No branches or pull requests
找了很久没找到FileImage字段
The text was updated successfully, but these errors were encountered: