Commit graph

704 commits

Author SHA1 Message Date
VagantemNumen
a2c826192f
Added check for maximum messages in the slice.
If more than 100 is present send the first 100 in the request and
ignore the rest.
2016-05-14 06:15:50 +05:00
VagantemNumen
d1dd35b677
Merge branch 'bulk-delete' of https://github.com/VagantemNumen/discordgo into bulk-delete 2016-05-14 06:04:58 +05:00
VagantemNumen
c4f596a93e
Added ChannelMessagesBulkDelete function.
Requires a channelID and a slice of messageIDs from the channel.
If only on ID is in the slice calls ChannelMessageDelete() internally.
If the slice of IDs is empty do nothing.
Noted maximum of 100 messageIDs in the comment.
2016-05-14 06:02:40 +05:00
VagantemNumen
35e6225f87
Added ChannelMessagesBulkDelete function.
Requires a channelID and a slice of messageIDs from the channel.
If only on ID is in the slice calls ChannelMessageDelete() internally.
If the slice of IDs is empty do nothing.
2016-05-14 05:27:41 +05:00
VagantemNumen
e435962b50
Added CHANNEL_MESSAGES_BULK_DELETE endpoint. 2016-05-14 05:15:56 +05:00
Bruce Marriner
a00f64aa86 Don't stomp on VoiceConnection if exists already
This allows you to enable voice debugging prior to joining a voice
channel.
2016-05-12 19:23:38 -05:00
Bruce
1d2d93a7b5 Merge pull request #196 from iopred/stateroles
Add Role tracking. Support disabling individual features in state. Closes #195.
2016-05-08 19:34:26 -04:00
Bruce
78b36a491c Merge pull request #193 from iopred/messageupdate
Merge message contents in state. Fixes #192
2016-05-08 11:36:15 -05:00
Bruce
f089de0541 Merge pull request #190 from iopred/develop
Replace multiple replaces with one regex replace.
2016-05-08 11:35:43 -05:00
Chris Rhodes
95f0d584d6 Add Role tracking. Support disabling individual features in state. 2016-05-07 19:43:53 -07:00
Chris Rhodes
80c2158605 Support streaming status updates. 2016-05-06 15:23:21 -07:00
Chris Rhodes
0c7562440e Merge message contents in state. Fixes #192 2016-05-05 19:13:15 -07:00
Chris Rhodes
96bcdc00a5 Replace multiple replaces with one regex replace. 2016-05-03 20:51:04 -07:00
Bruce Marriner
aede29500f Added entire voice struct for debugging 2016-05-03 09:35:59 -05:00
Bruce Marriner
2d213377c0 Add dgo link 2016-05-02 16:42:34 -05:00
Bruce Marriner
ad2aa618dd Expand rate limit locks a little 2016-05-02 09:55:30 -05:00
Bruce Marriner
6a4b8bb287 Fixed it! 2016-05-01 19:55:57 -05:00
Bruce Marriner
cb9e30670f no concurrent writes to voice ws, log cleanup 2016-05-01 19:54:28 -05:00
Bruce Marriner
5dc57e19c7 Display gateway url in error 2016-05-01 18:16:55 -05:00
Bruce Marriner
a9da8a5daf Cleanup, Logging, Finished Resumed code. 2016-04-30 21:40:13 -05:00
Bruce Marriner
c65d5091ab Fix resume bug! It's op not ip. 2016-04-30 20:29:27 -05:00
Bruce Marriner
9e8cd0a735 misc cleanup 2016-04-30 20:29:10 -05:00
Bruce
dd0b83333c Merge pull request #189 from jonas747/develop
Nickname support
2016-04-30 19:12:18 -05:00
Bruce Marriner
e9e9ef86b3 Prevent concurrent writes to gateway websocket. 2016-04-30 19:11:13 -05:00
Bruce Marriner
20240f3915 Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-30 17:52:32 -05:00
Bruce Marriner
9bc6057ca7 partial support for gateway resume 2016-04-30 17:52:09 -05:00
jonas747
0b313b016f Add nick field to guild member struct 2016-04-30 23:43:52 +02:00
jonas747
c8b796b223 Add GuildMemberNickname 2016-04-30 23:43:05 +02:00
Bruce
2136202ea9 Merge pull request #188 from jonas747/develop
Add mention_roles
2016-04-30 07:48:24 -05:00
Bruce
c7c7654dbf Merge pull request #187 from iopred/develop
Half-support nicknames.
2016-04-30 07:47:43 -05:00
jonas747
421496531a Add mention_roles 2016-04-30 04:38:05 +02:00
Chris Rhodes
aff0ab3fd1 Merge branch 'develop' of https://github.com/iopred/discordgo into develop 2016-04-29 19:03:46 -07:00
Chris Rhodes
98bf6b57d3 Replace stupid nicknames. 2016-04-29 19:03:14 -07:00
Bruce Marriner
b09ed37294 reconenct with identify packet until resume is fixed. 2016-04-29 14:57:41 -05:00
Bruce Marriner
53a826dd0d Send heartbeat in response to gateway Op 1 message 2016-04-28 22:30:42 -05:00
Bruce Marriner
d557bb24a5 Extra logging for non OP0 events, for now. 2016-04-28 21:50:57 -05:00
Bruce Marriner
c8e6cbffcf Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-28 21:18:53 -05:00
Bruce Marriner
f6de2b2c98 gateway, voice, & logging improvements
We now store teh sessionID of the gateway connection for later use. We
are now caching the gateway url and will use it until unable to connect
to that gateway.  We're not longer smashing the VoiceConnections map
during reconnects which was causing Voice problems. Slight change to
log output format.
2016-04-28 21:15:32 -05:00
Bruce
9aaebf7100 Merge pull request #186 from jonas747/develop
Fixed ChannelMessageAck
2016-04-28 18:16:50 -05:00
Bruce Marriner
38c51ce788 Renamed RateLimited to RateLimit
This is more consistant with other event names.
2016-04-28 17:43:41 -05:00
Bruce Marriner
098d7861a4 BREAKING - Added RateLimited event
Renamed RateLimit struct to TooManyRequests{} and added new event struct
RateLimited{} which can be registerd to with AddHandler() and will be
emitted anytime a HTTP 429 is received on the HTTP API.
2016-04-28 17:41:05 -05:00
jonas747
beec086d69 Fixed ChannelMessageAck 2016-04-29 00:40:42 +02:00
Bruce Marriner
94770635a9 Event handing improvements.
Corrected the Event struct to match it's new state based on Discord docs
and started tracking sequence number and sending it with heatbeats.
Also, move cleanup and comment improvements.
2016-04-28 16:59:45 -05:00
Bruce Marriner
2ac4665a4e Clean up Gateway API Event handling. 2016-04-28 14:22:43 -05:00
Bruce Marriner
a24f9e3d10 Slight better rate limit handling
This improves greatly on the previous rate limit handling
however still needs review and possible improvement.
Please report bugs!
2016-04-28 13:38:20 -05:00
Bruce Marriner
dd69a7e27f Added logging statements 2016-04-28 09:27:57 -05:00
Bruce Marriner
2b85edc4a1 comments 2016-04-28 09:26:35 -05:00
Bruce Marriner
609e7ad682 Logging code cleanup 2016-04-28 08:36:04 -05:00
Bruce Marriner
df818b5931 Merge branch 'develop' of https://github.com/bwmarrin/Discordgo into develop 2016-04-28 07:48:59 -05:00
Bruce Marriner
250579eb3a Fix incorrect handling of VOICE_SERVER_UPDATE
With this change, discordgo now properly supports
VOICE_SERVER_UPDATE events and will upon request
close existing connections and then re-open the
connection to the new voice endpoint.  This allows
voice gateway redirects and voice region changes
to work even while a client is sending audio.
2016-04-28 07:43:31 -05:00