PaginatedMessageEmbedFields select menu

I seem to find myself way too often in this forum, so, here we go again. Is there a way to disable the select menu on this class?
5 Replies
Marino
Marino•14mo ago
For now, I've found a solution, but a maintainer is more than welcome if there's a more official solution
const actions = [...PaginatedMessage.defaultActions].filter(
(item) => item.type !== 3
);
const actions = [...PaginatedMessage.defaultActions].filter(
(item) => item.type !== 3
);
Then I passed actions into #setActions
Favna
Favna•14mo ago
This is the correct way. If you don't want it on any PaginatedMessage then you can also do the same with PaginatedMessage.defaultActions = PaginatedMessage.defaultActions.filter(....) in some init file (I.e. where you call client.login())
Marino
Marino•14mo ago
Thanks! While you're here, can I redirect to an URL from API Routes within Sapphire?
Favna
Favna•14mo ago
not entirely sure but I think response.writeHead(304, { Location: '/' }).end(); or replace .end with .json or .text if you want either of those. We extend the basic HTTP module of NodeJS so: https://www.w3docs.com/snippets/nodejs/how-to-redirect-a-web-page-with-node-js.html
How to Redirect a Web Page with Node.js
Learn How to Redirect a Web Page with Node.js? The first step is to include the HTTP module and create a new server, then use the createServer method.
Marino
Marino•14mo ago
Thank you 😄