Browse Source

Stuff... yay

jD91mZM2 7 years ago
parent
commit
f73dec458e
1 changed files with 2 additions and 6 deletions
  1. 2 6
      restapi.go

+ 2 - 6
restapi.go

@@ -87,7 +87,7 @@ func (s *Session) request(method, urlStr, contentType string, b []byte, bucketID
 
 	req.Header.Set("Content-Type", contentType)
 	// TODO: Make a configurable static variable.
-	req.Header.Set("User-Agent", "DiscordBot (https://github.com/bwmarrin/discordgo, v"+VERSION)
+	req.Header.Set("User-Agent", "DiscordBot (https://github.com/bwmarrin/discordgo, v"+VERSION+")")
 
 	if s.Debug {
 		for k, v := range req.Header {
@@ -1382,11 +1382,7 @@ func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend)
 
 		for i, file := range files {
 			h := make(textproto.MIMEHeader)
-			h.Set("Content-Disposition",
-				fmt.Sprintf(`form-data; name="file%d"; filename="%s"`,
-					i,
-					quoteEscaper.Replace(file.Name),
-				))
+			h.Set("Content-Disposition", fmt.Sprintf(`form-data; name="file%d"; filename="%s"`, i, quoteEscaper.Replace(file.Name),))
 			contentType := file.ContentType
 			if contentType == "" {
 				contentType = "application/octet-stream"