We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8acb3a commit e4a0b06Copy full SHA for e4a0b06
1 file changed
src/commands/other/testChannelCreation.ts
@@ -0,0 +1,26 @@
1
+import {
2
+ ChatInputCommandInteraction,
3
+ MessageFlags,
4
+ PermissionFlagsBits,
5
+ SlashCommandBuilder,
6
+} from 'discord.js'
7
+
8
+export default {
9
+ data: new SlashCommandBuilder()
10
+ .setName('test-channel-creation')
11
+ .setDescription('try to create a blank channel')
12
+ .setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
13
14
+ async execute(interaction: ChatInputCommandInteraction) {
15
+ try {
16
+ await interaction.guild!.channels.create({
17
+ name: 'test-channel',
18
+ type: 0,
19
+ })
20
+ await interaction.editReply(`channel created successfully`)
21
+ } catch (err: any) {
22
+ console.error(err)
23
+ await interaction.editReply(`could not create channel: ${err}`)
24
+ }
25
+ },
26
+}
0 commit comments