Commit graph

13 commits

Author SHA1 Message Date
Austin Alvarado
70e829694d
Add Invite Create/Delete (#1105)
* Add Invite Create/Delete

* rename const

* Refactor Application

* Feedback & deprecation

* lint fix for godoc comment

* review feedback
2022-02-26 00:13:27 +03:00
Carson Hoffman
f5bb723db8
Convert more constants to absolute values
See 843c765ae3 for reasoning.
2021-05-29 17:55:43 -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
Ravy
c78bd2c24c
Add team data to applications (#787)
* add Team and TeamMember structs

* correct indentation

* consistency in the documentation

* fix data type for membership status

* enumerate the MembershipState

* make the linter happy

Co-authored-by: Ravy <ravy@farfrom.earth>
2020-06-28 16:50:55 -04:00
diamond's alt
a6d2557a8e Added Asset and ApplicationAssets (#666)
Fixed ApplicationAssets returning the wrong type

Added Asset and ApplicationAssets
2019-07-21 21:06:20 -07:00
Bruce
f60eda8bcb Add missing fields to Application struct 2017-04-10 21:07:04 +00:00
jonas747
56b19073d3 Ratelimits (#273)
* Added ratelimiter

Handles the new ratelimit headers
 - X-RateLimit-Remaining
 - X-RateLimit-Reset
 - X-RateLimit-Global

* Pad only reset time with a second

* Moved ratelimiter out of internal package

* Change for loop, move global ratelimit check inside sleep check

* Moved ratelimiter locking to getBucket

* Added global bucket

* Changed how bucket id's are done

Now each request function will need to specify the bucket id if the
endpoint contains minor variables

* Allow empty bucketID in request

* Remove some uneeded Endpoint* function calls

* Added test for global ratelimits

* Fixed a silly little mistake causing incorrect ratelimits

* Update test comments, Fixed treating a endpoint as 2 in ratelimiting

* Use date header from discord instead of relying on sys time sync

* Update all REST functions to use RequestWithBucketID

* Embed mutex into bucket

* Added webhook and reaction buckets
2016-11-04 08:07:22 -07:00
robbix1206
b961ee3b6f #231 Support getting Bot account / owner 2016-08-31 15:59:25 +02:00
Bruce Marriner
777a81710d Removed feature to convert user to bot account.
This feature was removed by Discord and no longer works.
2016-06-14 09:04:00 -05:00
Chris Rhodes
3686cc7ce3 Support many more idioms. 2016-06-03 20:59:35 -07:00
Bruce Marriner
1a672823a2 Lint and Cleanup 2016-04-11 18:54:19 -05:00
Bruce Marriner
24be2cda0b Added ApplicationBotCreate function 2016-03-11 15:58:38 -06:00
Bruce Marriner
a7910562ad Added OAuth2 Application functions and example 2016-03-11 13:47:04 -06:00