Commit graph

86 commits

Author SHA1 Message Date
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
Chris Rhodes
7ab242d361 Add State helper methods for reading permissions and role colors from Message roles. 2020-10-16 18:09:59 +11:00
Carson Hoffman
096fd806a7
Track presences from GuildMembersChunk 2020-06-20 20:32:32 -04:00
Alexander
97c5e2f7dc
state: add filling out BeforeDelete before deleting message 2020-03-01 20:57:44 +03:00
Skippy
2748413597
Merge pull request #545 from ikkerens/patch-1
Added copy of previous Message state to MessageUpdate
2019-04-19 10:37:06 -05:00
Soumil07
8fb9c2a11d track membercount on memberAdd and leave (#602)
* track membercount on memberAdd and leave

* requested changes
2018-10-24 08:30:37 -07:00
Chris Rhodes
d6e795c573
Make sure MemberCount isn't stomped when Guilds are added. 2018-07-23 20:09:49 -07:00
Rens Rikkerink
ee16996490
Fixed err shadowing 2018-05-09 14:35:06 +02:00
Rens Rikkerink
4cc57c5070
Added copy of previous Message state to MessageUpdate 2018-05-09 14:18:30 +02:00
Carson Hoffman
293b41141d Fix for #532 (#533) 2018-04-12 20:40:50 -07:00
Carson Hoffman
964060f34c General documentation improvements 2018-03-14 14:57:40 -04:00
MrJohnCoder
294ab42061
Fix typo 2017-12-02 22:16:49 -05:00
Max Boße
28dc6f6f33 Add members from GuildMembersChunk to state (#456) 2017-10-10 10:35:07 -07:00
Bruce
06b35cfe24 Linting. 2017-09-03 20:01:46 +00:00
Jonas is my name
3f2c1311d5 Export State.OnInterface (#417) 2017-08-13 19:52:05 -07:00
Erik McClure
42d1f62e58 Add memberMap to State to speed up member queries (#411)
* Fix #406: reconnect() can be called while still connected

* Add memberMap to speed up member queries

* Fix error return value and remove deletion

* Fix GuildAdd member map initialization edge case
2017-07-29 08:09:06 -07: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
legolord208
aa3973f956 Made error constants (Fixed #315) (#377) 2017-05-08 06:48:19 -07: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
Alexander
57c2762b53 Fixed a bad documentation comment for State.ChannelAdd (#338) 2017-03-16 07:04:58 -10:00
jonas747
6fd80199bf Handle MessageDeleteBulk event (#304)
* Handle MessageDeleteBulk event

* Changed State.MessageRemove to use id's

* Revert State.MessageRemove change and add State.messageRemoveById

* Fix linting
2016-12-28 12:29:36 -08:00
Kristian Klausen
b377944b97 Switch to V5 gateway (#300)
This switch the gateway to V5, and change the heartbeat logic to
get the heartbeat_interval from the new Hello opcode instant of
READY/RESUME event.
See: https://github.com/hammerandchisel/discord-api-docs/issues/18

Fix: #220
2016-12-25 16:22:14 -08:00
Bruce Marriner
9e777a083b Linting. 2016-12-11 12:45:34 -06:00
Chris Rhodes
db2f9eb29b Support getting the color of a user. (#299) 2016-12-10 21:37:11 -08:00
Chris Rhodes
fb346787be Improve permissions. (#298)
* Fix permissions to take into account @everyone override in channels.

* Keep early exit for channel owner.
2016-12-10 20:31:16 -08:00
Chris Rhodes
24a51f654f 👌 2016-11-30 18:02:13 -08:00
Chris Rhodes
9f7a7c9352 Don't stomp on messages or permission overrides on ChannelUpdate. 2016-11-30 17:59:17 -08:00
Chris Rhodes
315ae45231 Set GuildID on all members in discordgo land not in state. 2016-11-29 20:23:10 -08:00
Chris Rhodes
20d230cd04 Update GuildID's on GuildAdd 2016-11-29 19:17:03 -08:00
Chris Rhodes
54e0bd6087 Fix Admin permission calculations. 2016-11-29 19:09:01 -08:00
Chris Rhodes
1bc3fb9cd7 Set the GuildID for Members and VoiceStates on ready. 2016-11-29 19:05:09 -08:00
Chris Rhodes
c352d7016c Clean up ordering of internal handlers. (#285) 2016-11-12 11:50:06 -08:00
Chris Rhodes
ee3e500749 Add webhook support. 2016-11-03 19:41:57 -07:00
Chris Rhodes
6c53613186 Thanks govet. 2016-09-27 22:02:28 -07:00
Chris Rhodes
8164119cac Support a very light state in all cases to support b1nzy's upcoming PR 2016-09-27 21:44:16 -07:00
Chris Rhodes
910b864864 Merge pull request #255 from jonas747/msg-timestamps-missing
Apply more fields to existing message in message update
2016-09-27 21:15:14 -07:00
Chris Rhodes
9b6b657083 Merge pull request #249 from iopred/develop
Correctly merge GUILD_UPDATE events. Closes #242
2016-09-27 21:15:03 -07:00
jonas747
f01c5a3344 Apply more fields to message in message update
In case update was handled before create
2016-09-25 20:16:28 +02:00
Chris Rhodes
003454345b Use the everyone role to initialise the permission flags. 2016-09-15 18:51:09 -07:00
Chris Rhodes
42cef0c0d0 Remove unavailable goop, b1nzy says it'd never happen. 2016-09-08 20:06:24 -07:00
Chris Rhodes
678756c9a9 Simplify Guild.Unavailable and correctly merge GUILD_UPDATE events. 2016-09-08 19:39:29 -07:00
Bruce Marriner
ea72e85416 Deprecated Session.UserChannelPermissions
Created new UserChannelPermissions in State.
2016-07-18 17:04:00 -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
Chris Rhodes
95f0d584d6 Add Role tracking. Support disabling individual features in state. 2016-05-07 19:43:53 -07:00
Chris Rhodes
0c7562440e Merge message contents in state. Fixes #192 2016-05-05 19:13:15 -07:00
Chris Rhodes
7efe4ccfee 👌 2016-04-27 14:43:43 -07:00
Chris Rhodes
84f0b5d41a Add missing RLock in State.Channel 2016-04-27 14:38:29 -07:00
Bruce Marriner
bcc42e8211 Don't forget GoImports... 2016-04-23 22:35:12 -05:00