import { SlashCommandBuilder } from 'discord.js';
export const data = new SlashCommandBuilder()
.setName('make_thread')
.setDescription('make thread if true')
.addBooleanOption(option => option
.setName('thread')
.setDescription('if true, you get thread')
.setRequired(false)
);
export async function execute(interaction) {
await interaction.deferReply();
let msg = await interaction.editReply('thread');
if (interaction.options.get('thread')['value'] == true){
await msg.startThread({
name: `new`,
type: 'GUILD_PUBLIC_THREAD'
});
}
}
import { SlashCommandBuilder } from 'discord.js';
export const data = new SlashCommandBuilder()
.setName('make_thread')
.setDescription('make thread if true')
.addBooleanOption(option => option
.setName('thread')
.setDescription('if true, you get thread')
.setRequired(false)
);
export async function execute(interaction) {
await interaction.deferReply();
let msg = await interaction.editReply('thread');
if (interaction.options.get('thread')['value'] == true){
await msg.startThread({
name: `new`,
type: 'GUILD_PUBLIC_THREAD'
});
}
}