Commit graph

18 commits

Author SHA1 Message Date
Sentinel
cb59c78e32
Add size parameters to IconURL and BannerURL (#1301)
* Add missing parameters/structs

Adds guild icon size parameter, guild banner size parameter, missing ClientStatus struct

* Add missing endpoint for animated banners

* feat: revert ClientStatus changes

Revert addition of ClientStatus since another PR was already merged with
it.

* feat: add documentation for size parameter

* refactor: move icon url logic into separate func

Move logic for icon URLs in various functions into a single iconURL
function. Similar to banner and avatar functions.

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2023-01-18 01:59:00 +03:00
Fedor Lapshin
1ff58d47ef
fix(MultipartBodyWithJSON): form file field name format (#1256) 2022-10-07 14:42:57 +03:00
Fedor Lapshin
eda859edc9
feat: custom JSON marshal/unmarshal functions (#1162) 2022-04-17 21:39:18 +03:00
42Atomys
df7555c758
feat: Add Guild Member Cover & Accent Color support (#1117)
* feat: add field to struct

* feat(user): Add Banner support

* Update user.go

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>

* Update user.go

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>

* docs(banner): Replace all cover word with banner

* docs(banner): Remove link on image formatting on banner

* Update util.go

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>

* feat(structs#Member): removed BannerURL

* fix(user): wording in comment to BannerURL

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2022-03-02 21:29:10 +03:00
Andres Perez
dd5b9c6c05
Add Guild Member avatar (#1077)
* Add guild member avatar

* add avatar field on Member struct

* add endpoints for guild avatars

* add avatarURL util function for *User.AvatarURL and *Member.AvatarURL

* set GuildID on after GuildMember request

* fix Member.Avatar comment

* fix: gofmt

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
2022-02-26 00:26:51 +03:00
plally
ab47f123ba
support allowing webhook edits with files, and responding to interactions with files (#931)
* allow files in webhook message edits

* add Files to WebhookEdit struct

* move the construction of the multipart body for files into a shared function

* allow  interaction responses to have files

* go fmt

* fix err shadowing

* document MakeFilesBody

* rename MakeFilesBody -> EncodeWithFiles. fix InteractionRespond responding twice

* use resp in InteractionRespond files, add basic-command-with-files example command

* import strings and go fmt

* EncodeWithFiles -> MultiPartBodyWithJSON

* go fmt

* fix example for slash_commands

* move files to responsedata
2021-07-30 11:22:08 -04:00
NANI
9b1ba78bc6
Adding millisecond precision to SnowflakeTimestamp utility (#732)
* Millisecond precision

* formatting

* Update util.go

* remove unnecessary int64

* Add unit test for SnowflakeTimestamp

Co-authored-by: NANI <nani@ksoft.si>
Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2020-06-16 23:43:34 -04:00
necro
e3acfe56f0 added SnowflakeTimestamp utility function to obtain the creation date of a discord snowflake ID 2019-04-12 11:19:31 -04:00
Bruce Marriner
fc7ce3db94 Initial add of new logging system
This adds a LogLevel setting for both Websocket and VoiceConnections
that can be configured to set the specific log level desired. This
also adds a new logging function that adds additional helpful
information when printing out log messages.
2016-04-26 21:17:51 -05:00
jonas747
d1f25d8561 Changed fmt.Print to log.Print 2016-03-21 17:13:39 +01:00
Chris Rhodes
a08dde4262 Support zlib compression. 2016-01-23 21:09:30 -08:00
Bruce Marriner
301fb980d3 Updated copyright year, cleaned up some comments. 2016-01-07 13:50:44 -06:00
Bruce Marriner
35e3966b91 Reworded top comment 2015-11-23 10:16:23 -06:00
Bruce Marriner
abe55ecca7 Some improvements to comments. 2015-11-23 09:45:40 -06:00
Bruce Marriner
f655167761 Several updates to make library more idiomatic Go 2015-11-16 21:39:39 -06:00
Bruce Marriner
2448f72489 Major rewrite of REST API to include constants for all endpoints 2015-11-14 15:46:33 -06:00
Bruce Marriner
2c3ca777f9 Clean up, notes 2015-11-09 14:22:36 -06:00
Bruce Marriner
adac11495a Inital addition of Websocket handling. Lots of moving things around. 2015-11-08 19:26:46 -06:00