feat: refresh button

This commit is contained in:
TresAbhi committed 2023-06-25 02:32:56 +00:00
1 parent ae2d12a629
commit 58f5b894f9
30 files changed
+479 -299

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
export default function interactionToURL(
interaction: ChatInputCommandInteraction<CacheType>,
) {
const pathname = [
interaction.commandName,
interaction.options.getSubcommandGroup(),
interaction.options.getSubcommand(),
]
.filter(Boolean)
.join('/');
const urlSearchParams = new URLSearchParams();
interaction.options.data.forEach((option) => {
if (option.value) urlSearchParams.set(option.name, `${option.value}`);
});
console.log(`${urlSearchParams}`);
}