fix say command perms
This commit is contained in:
parent
d16bec1336
commit
d1377b538d
2 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { SlashCommandBuilder, Routes } from 'discord.js';
|
import { SlashCommandBuilder, Routes, PermissionFlagsBits } from 'discord.js';
|
||||||
import { REST } from '@discordjs/rest';
|
import { REST } from '@discordjs/rest';
|
||||||
import { getTags } from './tagsTags';
|
import { getTags } from './tagsTags';
|
||||||
|
|
||||||
|
@ -44,7 +44,8 @@ import 'dotenv/config';
|
||||||
.setName('content')
|
.setName('content')
|
||||||
.setDescription('Just content?')
|
.setDescription('Just content?')
|
||||||
.setRequired(true)
|
.setRequired(true)
|
||||||
),
|
)
|
||||||
|
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers),
|
||||||
].map((command) => command.toJSON());
|
].map((command) => command.toJSON());
|
||||||
|
|
||||||
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN!);
|
const rest = new REST({ version: '10' }).setToken(process.env.DISCORD_TOKEN!);
|
||||||
|
|
|
@ -112,6 +112,7 @@ client.on('interactionCreate', async (interaction) => {
|
||||||
);
|
);
|
||||||
} else if (commandName === 'say') {
|
} else if (commandName === 'say') {
|
||||||
if (!interaction.channel) return;
|
if (!interaction.channel) return;
|
||||||
|
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
await interaction.channel.send(interaction.options.getString('content')!);
|
await interaction.channel.send(interaction.options.getString('content')!);
|
||||||
await interaction.editReply('I said what you said!');
|
await interaction.editReply('I said what you said!');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue