Commit graph

962 commits

Author SHA1 Message Date
LEGOlord208
4edc63dabf
Merge branch 'develop' into 1 2017-07-23 08:39:19 +02:00
LEGOlord208
b813c5d0ca
Merge branch 'develop' into 1 2017-07-23 08:27:41 +02:00
legolord208
7bb0965a6f Updated to v6 (fixes #408) (#410)
* Updated to v6

* Unified websocket and REST version
2017-07-22 06:17:39 -07:00
Erik McClure
71ede90b56 Fix #406: reconnect() can be called while still connected (#407) 2017-07-18 18:21:45 -07:00
Bruce
d51cda6e5a Merge pull request #392 from jonas747/feature-gatewaybot
Add GatewayBot
2017-07-11 12:57:02 -05:00
jonas747
31075bc148 Update the GatewayBot test to use the bot session 2017-07-10 18:36:19 +02:00
jonas747
83e18aad7d Fix comment for GatewayBot 2017-07-10 18:31:26 +02:00
jonas747
9d3cd03314 Add GatewayBot 2017-07-10 18:31:26 +02:00
Bruce
9d41d8595b Merge pull request #403 from jonas747/feature-bottest
Add bot account to testing
2017-07-09 21:36:30 -05:00
jonas747
389ba8760d Add bot account to testing 2017-07-08 15:38:34 +02:00
Bruce
fc8d981e5e Removed link to old unofficial docs fixes #387 2017-07-04 17:25:42 +00:00
AAAAAAAAAAA
ef520cb26d Add GuildMemberDeleteWithReason (#399) 2017-07-02 17:42:05 -07:00
Erik McClure
bb4b96e26d Add heartbeat ACK response and error handling (#396)
* Add heartbeat ACK response and error handling

- Error when sending a heartbeat now triggers a reconnection
- Op7 now triggers a reconnection
- Session now tracks the last heartbeat ACK that was recieved. If the
last ACK is more than FailedHeartbeatAcks*heartbeatinterval in the past,
this is treated as a dead connection and a reconnection is forced.

* Address @iopred comments
2017-06-27 20:52:59 -07:00
legolord208
5a02430c02 ContentWithMoreMentionsReplaced for roles and nicks (Fixes #208) (#375)
* ContentWithMentionReplaced on roles and nicks (Fixes #208)

* Compatibility

* Like this? 🤔

* More efficient regexp

* Tweaked a little

* Tweaked a little more

* Tweaked even more

* Removed unessecary crap condition that is useless

* Disallow voice channel

* Moved regexp declaration
2017-06-13 08:49:41 -07:00
Ammar Bandukwala
0983790428 Fix goroutine leak in opusReceiver (#393) 2017-06-10 13:39:27 -07:00
rfw
874325a504 Add and fix support for multiple file uploads via ChannelMessageSendComplex via the new field MessageSend.Files. (#391)
For compatibility with existing library consumers, the File field is retained but will behave as if Files contained that single file. If both are specified, ChannelMessageSendComplex will return an error.

The message JSON payload is moved to a form-data field called `payload_json`, instead of set in multipart form data. This is supported and the recommended way, as per the API docs.

Apparently, you can attach multiple files if you just name the parts names differently in the multipart request. The parts are named here using the order the files were specified, as `file%d`. This is not documented in the API docs, but definitely works.

This also removes serialization of the File field via json.Marshal, as it will never be directly serialized in the JSON. The new field, Files, is similarly not marshaled.

This additionally adds a ContentType field in File, which can be used to specify the content type of the attached file. The ContentType field will default to setting the header to `application/octet-stream` if empty. Discord currently doesn't do much with the Content-Type header, but we should pass this information along anyway in accordance to the MIME standard.
2017-06-10 13:13:28 -07:00
Rinzen Necroforger
a71f5e3e61 Support animated avatar URLs (#388)
* Methods to obtain a user's avatar URL

* Created EndpointUserAvatarAnimated and updated AvatarURL

* Fixed the size parameter
2017-05-29 20:03:39 -07:00
legolord208
6aec04d69d omitempty (#383) 2017-05-20 10:56:45 -07:00
Bruce
f2cad25dc9 Bump version to v0.17.0-dev 2017-05-15 16:12:45 +00:00
Bruce
0993a94b4e Bump version to 0.16.0 2017-05-15 15:02:49 +00:00
Bruce
2feb43f068 Merge branch 'master' into develop
Conflicts:
	README.md
	discord.go
2017-05-15 14:59:20 +00:00
AAAAAAAAAAA
eed1d20f1a Fix presence unmarshal with game names as numbers (#381)
* Game name is also not validated on the server

* Use json.Number instead
2017-05-08 08:32:00 -07:00
legolord208
aa3973f956 Made error constants (Fixed #315) (#377) 2017-05-08 06:48:19 -07:00
legolord208
25c8012990 Added missing permission constants (#378) 2017-05-08 06:43:50 -07:00
LEGOlord208
27db9ad6df DIE, PRINTF. DIE! 2017-05-04 20:23:17 +02:00
LEGOlord208
853853d59f Merge remote-tracking branch 'upstream/develop' into 1 2017-05-04 20:22:05 +02:00
Rinzen Necroforger
f539136306 Add Presence Tracking to State (#371)
* Add Presence tracking to the state

* Do not need to check if Roles and Game is nil

* Append presence to guild.Presences if not found
2017-05-04 07:00:59 -07:00
Bruce
5e2c93b4f1 Added warning to New/Login functions fixes #342 2017-05-03 21:47:57 +00:00
legolord208
2b80b35528 ChannelFileSendWithComplex (#370)
* ChannelFileSendWithComplex

* Moved to ChannelMessageSendComplex

* Oops

* Return consistency

* Re-used variable

* Omit empty
2017-05-01 07:50:49 -07:00
Bruce
ccbdeb8c54 Merge pull request #368 from calmandniceperson/master
Fix typo in description of VERSION constant
2017-04-29 23:37:08 +00:00
Michael Köppl
d8f81e54bb Fix typo
It is called 'Semantic Versioning'
2017-04-29 23:21:10 +02:00
jonas747
4fb7760b59 Added reason go GuildBanCreate (#367)
* Added reason go GuildBanCreate

* Added GuildBanCreateWithReason
2017-04-28 18:41:48 -07:00
LEGOlord208
c40b975354 STOP USING PRINTF PLS 2017-04-28 21:34:30 +02:00
Chris Rhodes
7b62921b4e Pedantic comment updates. 2017-04-28 12:30:00 -07:00
Ammar Bandukwala
e58e61b0ff add Tag method to user (#364)
* add Tag method to user

* change format verb to %s

* use consistent string forming
2017-04-28 12:29:20 -07:00
legolord208
5cc4af9aa2 Chaining ChannelMessageEditComplex (#365)
* Chaining ChannelMessageEditComplex

* Removed .Do()
2017-04-28 12:24:38 -07:00
legolord208
43c8b518ad Added user notes (#361)
* Added user notes

* Added note websocket event (thanks iopred :D)

* Added ready event (thanks again, iopred)

* Renamed function
2017-04-28 12:22:02 -07:00
Bruce
2a4314dbdc Merge pull request #363 from Lord-Ptolemy/develop
Fixed grammatical error in restapi.go docs
2017-04-28 14:24:43 +00:00
Lord-Ptolemy
be3675c2c2
Fixed grammatical error 2017-04-27 21:27:35 -04:00
LEGOlord208
65f0cb9f73 Arise error when user has 2FA (#359)
* Arise error when user has 2FA

* Fixed error message

* Removed ticket
2017-04-18 21:35:17 -07:00
Bruce
17b21b989c Merge branch 'develop' of https://github.com/bwmarrin/discordgo into develop 2017-04-18 14:05:02 +00:00
Bruce
569ebc1477 Little README lovin' ❤️ 2017-04-18 14:04:39 +00:00
Chris Rhodes
691040e745 Generate MessageReactionRemoveAll handler. 2017-04-15 11:14:39 -07:00
Floretta
db909b14fa add: MessageReactionRemoveAll event (#357) 2017-04-15 09:07:59 -07:00
LEGOlord208
9b9f289415 How about no? (#356)
I don't know why somebody would do something this inefficient, but I think plain concatination is a better approach
2017-04-14 09:07:36 -07:00
Bruce
3aa7eadbf8 Fix avatar usage example, spaces are important too. 2017-04-14 14:10:09 +00:00
Bruce
5fcb5fa7eb Correct appmaker readme usage example 2017-04-14 14:08:58 +00:00
Bruce
65232ca5ef Slight improvement to airhorn example description 2017-04-14 14:05:28 +00:00
Bruce
e16cb509c2 Consolidated avatar examples to one, cleaned it up. 2017-04-14 14:02:37 +00:00
Bruce
7044ac3441 username can be omitted on UserUpdate 2017-04-14 14:00:25 +00:00