Commit graph

1327 commits

Author SHA1 Message Date
Fedor Lapshin
b0fa920925
Slash commands (#856)
* UnknownBan error code addition

* GuildBan method implementation

* Gofmt fix

Gofmt fix

* Interactions: application commands basic API and gateway integration

* Some gitignore update

* Application commands and interactions API implementation

* Some fixes

* Some improvements of slash-commands example and slash-commands API

* OAuth2 endpoints backward compatibility

* Gofmt fix

* Requested fixes and documentation improvement for application commands

* Some fixes

* New and more interesting example of slash-commands usage, merging "interaction.go" and "interactions.go" into a single file. And some fixes.

* Gofmt and documentation fixes

* More fixes

* Gofmt fixes

* More fixes!

* Doc and endpoint fixes

* Gofmt fix

* Remove dependence on open gateway connection

* Remove redundant command ID checks

* Fix typo in ApplicationCommandCreate comment

* Tidy up function calls returning body

* Add upcoming API changes

* Correct return value name, swap parameter order

* Add Version field to ApplicationCommand

* Fix up language in comments

* Remove redundant conversion to float64

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2021-02-28 21:54:02 -05:00
Jim Eagle
4617d8e379
Add guild preview endpoint (#818) 2021-02-24 12:10:18 -05:00
Carson Hoffman
2021f608f6
Merge pull request #880 from galberti/fix_rtp_ext_header
Fix RTP extended header parsing
2021-02-23 13:40:16 -05:00
Gabriele Alberti
b18e1d7276 Fix RTP extended header parsing
As ext header length isn't always 1, the shift to find the beginning of
the Opus packet must be adjusted dynamically.
2021-02-22 13:20:15 +01:00
Carson Hoffman
c27ad65527
Sleep for correct duration after 429 2021-02-05 13:06:05 -05:00
AlexPresso
b6deecb67d
Add MessageReactionsRemoveEmoji (#873)
* Add MessageReactionsRemove

* Add MessageReactionsRemove

* Rename MessageReactionsRemove to MessageReactionsRemoveEmoji

Co-authored-by: Qais Patankar <qaisjp@gmail.com>

* Update MessageReactionsRemoveEmoji comments

Co-authored-by: Qais Patankar <qaisjp@gmail.com>
2021-02-03 19:13:48 -05:00
Alex
5f6bb2d120
Set channel and role edit perms to int64 (#867)
* set channel and role edit perms to int64

* add string serialization
2021-01-27 12:55:31 -05:00
Carson Hoffman
e6a8d51c9b
Add JSON tags to Activity struct 2021-01-26 13:24:24 -05:00
Carson Hoffman
d4d47b65ee
Bump library version to v0.23.0 2021-01-23 19:53:47 -05:00
Carson Hoffman
cbfa831b6c
Merge pull request #866 from bwmarrin/v8
Switch library to API version v8
2021-01-23 19:52:04 -05:00
Carson Hoffman
90531dc713
Fix permissions type for UserGuild 2021-01-20 20:19:51 -05:00
Carson Hoffman
0f0aaad011
Correct header in rate limit test 2021-01-20 19:48:09 -05:00
Carson Hoffman
bd34c3c66d
Add comment for UnmarshalJSON 2021-01-20 19:43:00 -05:00
Carson Hoffman
b7a2a4b7fa
Correct rate limit test magnitude 2021-01-20 19:42:53 -05:00
Carson Hoffman
9548146f69
Fix comment on UpdateGameStatus 2021-01-20 19:34:05 -05:00
Carson Hoffman
657ac048fe
Switch example to use UpdateGameStatus 2021-01-20 19:33:43 -05:00
Carson Hoffman
c41dc15a10
Add changes to presences, remove Game type 2021-01-20 18:54:38 -05:00
Carson Hoffman
866ecccb2e
Support millisecond precision in rate limits 2021-01-20 18:39:43 -05:00
Carson Hoffman
daaafb5a7f
Rename fields for v8 2021-01-20 18:22:39 -05:00
Carson Hoffman
167b649902
Remove support for optional intents 2021-01-20 18:18:34 -05:00
Carson Hoffman
9fc2793e83
Add reply and application command message types 2021-01-20 18:14:50 -05:00
Carson Hoffman
93d5c5947b
Correct gap in message types 2021-01-20 18:13:18 -05:00
Carson Hoffman
3773e286e6
Add v8 permissions changes 2021-01-20 18:11:20 -05:00
Carson Hoffman
9eb033c0db
Bump API version to v8 2021-01-20 18:05:39 -05:00
Carson Hoffman
bca349d46d
Change library version to alpha for v8 2021-01-20 18:05:27 -05:00
Carson Hoffman
ad76e32450
Merge pull request #855 from bsdlp/interactions-verify
implement interaction request signing verification
2021-01-16 21:49:07 -05:00
Carson Hoffman
96848bf0be
Drop 1.11 and 1.12 checks in Travis 2021-01-16 21:45:20 -05:00
Carson Hoffman
1eb5da8a35
Merge pull request #863 from CinePlays/master
Add missing field in member struct
2021-01-16 21:41:08 -05:00
Jon Chen
dc3c2d5533 implement interaction request signing verification 2021-01-13 17:43:43 +00:00
Carson Hoffman
56af790515
Merge pull request #861 from automuteus/master
Fix invalid RateLimit event type
2021-01-12 15:26:43 -05:00
CinePlays
de64206da6 Added missing field in member struct 2021-01-06 22:40:00 +01:00
denverquane
e2c5d80fa6 Fix invalid RateLimit event type 2020-12-30 13:50:52 -07:00
Carson Hoffman
8d6815dde7
Merge pull request #845 from LagSwitchedVirginity/patch-1
Add omitempty to MessageReference's GuildID field
2020-12-17 14:02:21 -05:00
Fedor Lapshin
f124f38563
GuildBan method and UnknownBan error code addition (#848)
* UnknownBan error code addition

* GuildBan method implementation

* Gofmt fix

Gofmt fix
2020-12-17 13:59:41 -05:00
Nicholas Phillips
26be533516
Add omitempty to MessageReference's GuildID field
Direct Messages do not have the **guild_id** field for Message Referencing / the new Reply feature.
__Instead it is only **message_id** and **guild_id**__
2020-12-03 16:49:07 -05:00
Carson Hoffman
31f70d4394
Merge pull request #842 from Zabqer/master
Add support for sending message reply
2020-11-22 09:50:21 -05:00
Carson Hoffman
b5c29a9963
Merge pull request #833 from nickmcski/issue-823
Add previous state to VoiceStateUpdate event (#823)
2020-11-20 11:43:53 -05:00
Alexey
1b13267ba4 Add support for sending message reply 2020-11-20 16:11:12 +03:00
Carson Hoffman
fb996efa76
Merge pull request #838 from qaisjp/webhook-appid
Add ApplicationID to Webhook
2020-11-15 15:02:07 -05:00
Jonathan Roth
9bcbfecf1d
Add lock to prevent race condition (#816)
There's a race between `VoiceConnection.Disconnect()` and `VoiceConnection.onVoiceStateUpdate()` (accessing VoiceConnection.sessionID)
2020-11-15 14:55:36 -05:00
Qais Patankar
0dbc0d17a7 Add ApplicationID to Webhook 2020-11-15 19:40:37 +00:00
Nicholas McCurry
a6d7b88762 Add previous state to VoiceStateUpdate event (#823) 2020-11-05 16:43:55 -07:00
Carson Hoffman
92c52f3db1
Add comments on new methods 2020-10-29 11:42:11 -04:00
Carson Hoffman
2f40c4489c
gofmt pass 2020-10-28 21:25:22 -04:00
Manfred Touron
2fe5745a4e
chore: add missing fields in User struct (#790)
based on https://discord.com/developers/docs/resources/user

Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
2020-10-24 16:24:31 -04:00
Chris Rhodes
7ab242d361 Add State helper methods for reading permissions and role colors from Message roles. 2020-10-16 18:09:59 +11:00
Samuel Hunter
8c5ca3de95
Add banner to GuildParams struct (#735) 2020-08-25 10:42:45 -04:00
Aditya Diwakar
4b6abc53af
Add Guild Member Mute/Deaf Edit Support (#804)
*  Add member edit deaf/mute support

* Resolve omitempty issues
2020-08-12 10:24:33 -04:00
Aditya Diwakar
a2751f6d16
Add Go v1.15 in CI (#803) 2020-08-12 10:22:20 -04:00
zekro
b806975e3b
add user public flags field and public flag consts (#801)
* add user public flags field and public flag consts

* fix user flag constant initialization and vaalue documentation

* fix user flag constants values
2020-08-08 17:42:45 -04:00