Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix channelMap not being filled for bot users/>100 guilds #165

Merged
merged 1 commit into from
Apr 13, 2016
Merged

Fix channelMap not being filled for bot users/>100 guilds #165

merged 1 commit into from
Apr 13, 2016

Conversation

b1naryth1ef
Copy link
Contributor

Previously we only filled the channelMap inside of READY. Because of lazy guild loading, this was not valid for the majority of users (e.g. bot users and users with more than 100 guilds). We now properly handle both cases, by filling in the channelMap on GUILD_CREATE.

This commit also refactors the way we do locking inside of GUILD_CREATE and CHANNEL_CREATE to be a bit cleaner.

@iopred 馃憖 plz

@b1naryth1ef b1naryth1ef changed the title Fix channelMap being filled in the wrong location (READY vs GUILD_CREATE) Fix channelMap not being filled for bot users/>100 guilds Apr 13, 2016
Previously we only filled the channelMap inside of READY. Because of
lazy guild loading, this was not valid for the majority of users (e.g.
bot users and users with more than 100 guilds). We now properly handle
both cases, by filling in the channelMap on GUILD_CREATE.

This commit also refactors the way we do locking inside of GUILD_CREATE
and CHANNEL_CREATE to be a bit cleaner.
@bwmarrin bwmarrin added this to the v0.13.0 milestone Apr 13, 2016
@bwmarrin bwmarrin added the feature Feature implementation label Apr 13, 2016
@iopred
Copy link
Collaborator

iopred commented Apr 13, 2016

LGTM ship it.

@bwmarrin bwmarrin added the fix Pull requests and issues related to bug fixes and structural inconsistencies label Apr 13, 2016
@bwmarrin bwmarrin modified the milestones: v0.12.1, v0.13.0 Apr 13, 2016
@bwmarrin bwmarrin merged commit 4c4e838 into bwmarrin:master Apr 13, 2016
alex-j-butler pushed a commit to alex-j-butler/discordgo that referenced this pull request Nov 5, 2016
Fix channelMap not being filled for bot users/>100 guilds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature implementation fix Pull requests and issues related to bug fixes and structural inconsistencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants