Commit graph

273 commits

Author SHA1 Message Date
Eric Wohltman
9c33bfbada
Update unmarshal function to wrap ErrJSONUnmarshal and return specific error message. Requires at least Go 1.13. (#924) 2021-05-14 22:30:27 -04:00
Pierce
7d7206b01b
Bulk command overwrite (#926)
* add session.ApplicationCommandBulkOverwrite

* change ApplicationCommandBulkOverwrite to take a guildID

* formatting

* add omitempty to ID of ApplicationCommand
2021-05-11 23:51:33 -04:00
Carson Hoffman
182d9b48f3
Add more robust file support for webhooks 2021-03-14 12:27:22 -04:00
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
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
daaafb5a7f
Rename fields for v8 2021-01-20 18:22:39 -05:00
Carson Hoffman
3773e286e6
Add v8 permissions changes 2021-01-20 18:11:20 -05:00
denverquane
e2c5d80fa6 Fix invalid RateLimit event type 2020-12-30 13:50:52 -07: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
Alexey
1b13267ba4 Add support for sending message reply 2020-11-20 16:11:12 +03: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
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
b7ef3c8e0f Handle error in ChannelNewsFollow 2020-08-06 19:31:43 -04:00
Aditya Diwakar
eb70c17733 Add support for retrieving Webhook ID 2020-08-05 18:54:12 -04:00
Aditya Diwakar
10195fcfbb Add support for news channels
Endpoint support added:
- @/channels/:id/messages/:id/crosspost - publishes a message in a news
  channel to followers
- @/channels/:id/followers - follows a news channel
2020-08-05 18:31:38 -04:00
Robbie Trencheny
4738844e34
Rename GuildEmoji to GuildEmojis 2020-06-28 16:02:02 -07:00
Robbie Trencheny
f193d81d83
Add GuildEmoji function 2020-06-28 16:01:21 -07:00
Dylan Meador
9c46cf4ec7
Update GuildMemberMove to support removing from all voice channels (#789) 2020-06-28 18:34:50 -04:00
b-o-r-k
a853557f4d
Add missing fields in GuildChannelCreateData (#782)
According to https://discord.com/developers/docs/resources/guild#create-guild-channel, the endpoint also accepts the following fields:

- rate_limit_per_user: integer
- position: integer
2020-06-15 11:14:01 -07:00
Noah Santschi-Cooney
69edfdf4ac
discordapp.com -> discord.com (#772)
Change API URL from discordapp.com to discord.com
2020-05-08 21:26:13 -04:00
Carson Hoffman
45124d8303 Revert "Changed domain from discordapp.com to discord.com (#769)"
This reverts commit f4ca8874a3.
2020-05-07 12:27:07 -04:00
Hunter Paulson
f4ca8874a3
Changed domain from discordapp.com to discord.com (#769)
* Allow resume on reconnect

* Version 0.20.3: allow resume on reconnect

* Update index.md

* Update README.md

* Update GettingStarted.md

* Update endpoints.go

* Update README.md

* Update event.go

* Update wsapi.go

* Update restapi.go

* Resolved spelling issue

Co-authored-by: Carson Hoffman <c@rsonhoffman.com>
2020-05-04 21:13:28 -07:00
Carson Hoffman
525ac13aa7
Merge pull request #626 from AtomGrafiks/master
Add pagination to MessageReactions
2019-12-26 20:42:56 -05:00
Carson Hoffman
afe392e6c1
Merge pull request #694 from BigHeadGeorge/fix-tts-casing
Fix inconsistent TTS casing
2019-12-26 20:22:41 -05:00
Carson Hoffman
e4e03cf8b5
Merge pull request #683 from recapitalverb/develop
Remove State fallback from Session#Guild
2019-12-26 19:46:40 -05:00
Eric Wohltman
307c335eb6 Fix for Discord's API returning a 400 Bad Request if Content-Type is set, but the request body is empty. 2019-12-19 12:46:45 -05:00
Gregory DALMAR
10edf15944
Update fork and resolve conflicts 2019-11-20 18:50:51 +01:00
Bruce Marriner
8416350234 Merge branch 'master' of https://github.com/bwmarrin/discordgo 2019-10-18 10:46:55 -05:00
Bruce Marriner
8baec95e44 Merge branch 'develop' 2019-10-18 10:44:50 -05:00
tuckerrrrrrrrrrrr
bc6197c5e6 fix inconsistent tts casing 2019-09-10 18:09:24 -07:00
recapitalverb
7d04e7dfb3 Remove State fallback from Session#Guild 2019-08-09 20:59:46 +07:00
Julian Y
792b209680
Modify GuildEdit bounds check 2019-08-04 01:28:49 -07:00
tsudoko
191dea097d Escape # in emoji IDs passed to reaction endpoints (#615) 2019-07-21 21:11:43 -07:00
Qais Patankar
d3c96d18be Fix #622: support for WebhookExecute msg response (#663) 2019-07-21 21:07:28 -07:00
diamond's alt
7896167153 added useragent (#653) 2019-05-28 16:52:23 -07:00
Jesse
544e4b9a8c
Add proper response type for GuildBans docs
The previous documentation stated that the response type was an array of User structures, when the function return an array of GuildBan structures.
2019-05-12 19:14:27 -06:00
Gregory DALMAR
624ff560d4 Merge remote-tracking branch 'upstream/master' 2019-02-01 15:00:32 +01:00
Chris Rhodes
b86482cd77 Backport retrieving Guilds from State to develop. Fix bugs when Guild is Unavailable 2018-11-02 10:37:52 -07:00
Skippy
32167eae71
Merge pull request #546 from ikkerens/patch-2
Added GuildChannelCreateComplex
2018-08-27 11:29:35 -05:00
Skippy
2cc0417697
Merge pull request #366 from jD91mZM2/1
STOP USING PRINTF PLS
2018-08-22 19:50:27 -05:00
Gregory DALMAR
10b8f7c351 Add pagination to MessageReactions 2018-06-18 15:42:17 +02:00
Sebastian Winkler
6f45ea3535
adds Unique field to ChannelInviteCreate 2018-06-08 14:25:06 +02:00
Chris Rhodes
bb42325c3a
Add an explicit log and error for when a request is attempted with an unauthorized token that is not a bot token. (#553) 2018-05-26 16:52:00 -07:00
Bruce
adc6a99c3d
Merge pull request #551 from Seklfreak/add-emoji-methods
adds GuildEmojiCreate, GuildEmojiEdit, and GuildEmojiDelete
2018-05-24 09:08:06 -05:00
Sebastian Winkler
9aae26445f
adds InviteWithCounts 2018-05-23 16:27:14 +02:00
Sebastian Winkler
1bf986726a
fixes comments 2018-05-20 14:40:55 +02:00
Sebastian Winkler
8f686efd24
adds GuildEmojiCreate, GuildEmojiEdit, and GuildEmojiDelete 2018-05-20 14:37:02 +02:00