Skip to content

Commit

Permalink
fix: load guild into memory
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Mar 28, 2024
1 parent 4f5096b commit 67e358f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions commands/other/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 67e358f

Please sign in to comment.