Asynchronous user fetching causing issues with embeds and buttons
Hi,
I'm using redis to track the number of messages a user has sent in a thread and I store it in a hash using the userid as the key.
I'm trying to get the user's name to use it as the label for a button.
My code goes over an array of IDs and for each ID it grabs the username and adds a button to an actionrow.
The cache is undefined for some reason so I'm using
interaction.guild?.members.fetch(<user id>)
interaction.guild?.members.fetch(<user id>)
.
The issue being that awaiting that method causes some weird issues (see the pastebin) and not awaiting it returns nothing as expected. The function it's in is async...