From 67e358ffa5ce7e2bd1137eab14764ea0078943c7 Mon Sep 17 00:00:00 2001 From: Magic <82341152+MagicTheDev@users.noreply.github.com> Date: Thu, 28 Mar 2024 00:51:14 -0500 Subject: [PATCH] fix: load guild into memory --- commands/other/commands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/other/commands.py b/commands/other/commands.py index 168448ae..db9882d7 100644 --- a/commands/other/commands.py +++ b/commands/other/commands.py @@ -20,6 +20,11 @@ def __init__(self, bot: CustomClient): @commands.slash_command(name="role-users", description="Get a list of users in a role") async def roleusers(self, ctx: disnake.ApplicationCommandInteraction, role: disnake.Role): await ctx.response.defer() + if not ctx.guild.chunked: + if ctx.guild.id not in self.bot.STARTED_CHUNK: + await ctx.guild.chunk(cache=True) + else: + self.bot.STARTED_CHUNK.add(ctx.guild.id) embeds = [] text = "" num = 0