From f73dec458e7d5d50208a5245e34a0a1b0a34e21a Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Fri, 8 Sep 2017 17:01:32 +0200 Subject: [PATCH] Stuff... yay --- restapi.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/restapi.go b/restapi.go index ee563b9..7471c4f 100644 --- a/restapi.go +++ b/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"