diff --git a/api/guild.go b/api/guild.go index 49d4ace..69e1505 100644 --- a/api/guild.go +++ b/api/guild.go @@ -147,7 +147,7 @@ func (c *Client) GuildsBefore(before discord.GuildID, limit uint) ([]discord.Gui if limit > 0 { // Only fetch as much as we need. Since limit gradually decreases, // we only need to fetch min(fetch, limit). - fetch = uint(min(maxMessageFetchLimit, int(limit))) + fetch = uint(min(maxGuildFetchLimit, int(limit))) limit -= fetch } @@ -192,7 +192,7 @@ func (c *Client) GuildsAfter(after discord.GuildID, limit uint) ([]discord.Guild if limit > 0 { // Only fetch as much as we need. Since limit gradually decreases, // we only need to fetch min(fetch, limit). - fetch = uint(min(maxMessageFetchLimit, int(limit))) + fetch = uint(min(maxGuildFetchLimit, int(limit))) limit -= fetch } diff --git a/api/member.go b/api/member.go index 5ec1069..431d685 100644 --- a/api/member.go +++ b/api/member.go @@ -47,7 +47,7 @@ func (c *Client) MembersAfter( // Only fetch as much as we need. Since limit gradually decreases, // we only need to fetch min(fetch, limit). if limit > 0 { - fetch = uint(min(maxMessageFetchLimit, int(limit))) + fetch = uint(min(maxMemberFetchLimit, int(limit))) limit -= fetch } diff --git a/api/message_reaction.go b/api/message_reaction.go index 05b5da1..dd9df4c 100644 --- a/api/message_reaction.go +++ b/api/message_reaction.go @@ -64,7 +64,7 @@ func (c *Client) ReactionsBefore( if limit > 0 { // Only fetch as much as we need. Since limit gradually decreases, // we only need to fetch min(fetch, limit). - fetch = uint(min(maxMessageFetchLimit, int(limit))) + fetch = uint(min(maxMessageReactionFetchLimit, int(limit))) limit -= fetch } @@ -110,7 +110,7 @@ func (c *Client) ReactionsAfter( if limit > 0 { // Only fetch as much as we need. Since limit gradually decreases, // we only need to fetch min(fetch, limit). - fetch = uint(min(maxMessageFetchLimit, int(limit))) + fetch = uint(min(maxMessageReactionFetchLimit, int(limit))) limit -= fetch }