Ephemeral PaginatedMessages are unusable
https://ss.clanware.org/CdquvjYO.png
It always says that it's someone else's message.
@sapphire/framework@npm:4.7.2
@sapphire/discord.js-utilities@npm:7.0.2
Solution:Jump to solution
Unfollowing this because it's fixed in
@sapphire/discord.js-utilities@7.1.2
48 Replies
Please show your code ๐
The code for generating the embeds etc is 500 lines long but heres a relevant snippet
page.run(interaction)
refers to a button interaction (when they hit 'View case')
Note that when I use a slash command to select the case, this works perfectly
still need help@Favna
๐
Tag fav a
@Favna
I see the pings btw. I
I've just been very busy
I'll go through the posts not yet marked as solved in due time
so to recap @cosigyn
- You send something that has a button
- When user clicks a button you create a new PaginatedMessage. So this is in a class that extends
InteractionHandler
.
- You pass the interaction from the button to the run function
is that correct?Yes
I dumbed it down to this:
command.ts
button-handler.ts
and it works just fine for me @cosigyn. The only way I can actually break it is by doing this in the button handler:
but that is also not how PM works. To make a PM ephemeral the interaction it is being ran on has to be ephemeral. Ergo, starting a PM from a button cannot be ephemeral.I used deferReply to make it ephemeral
Incase it wasn't clear, the paginated message works fine normally, when it's created from a command rather than a button, but when its created from a button, I'm unable to click the PM buttons, as it always says 'its for someone else' after someone else clicks on the button and creates a new PM
I am having a similiar issue so I am going to ask here. My paginated message is not being generated from a button but the original slash command. I use them to call a "shop's" inventory. Certain channels/threads represent shops with varying inventories. I defer the interaction w/
await interaction.deferReply({ ephemeral: true })
. Then I get the data from our API and reply with the paginated message. I use the default actions (less the selection menu) only. I'm using the latest dependencies.
The BeholderPaginatedMessage
class I copied the example of Dragonite just to lower the default idle.
If someone checks the inventory in the same shop they get a message to stop interacting with Y user's buttons![No description](https://cdn.answeroverflow.com/1173820830157918259/image.png)
Changing the command to
but keeping the rest the same I still cannot replicate the issue.
Please provide a small reproduction GitHub repository which I can run after providing only a Discord token so I can analyse the issue further.
FYI you dont need to do
actions: []
. setActions
by default already overrides the default actions.
So you can just do:
As for your particular issue, that should definitely work. For example @Dragonite uses the exact same process (https://github.com/favware/dragonite). The same will go for you to provide a small reproduction repository.Ok thanks Iโll get on it
I will provide a reproduction repo, but did you get someone else to click the button after you did, and then try to use the paginated message again?
I did not. I'll try that later.