mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: refresh button
This commit is contained in:
1 parent
ae2d12a629
commit
58f5b894f9
30 files changed
+479
-299
No files matched your search
@@ -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}`);
|
||||
}
|
||||
Reference in new issue
Block a user