Fixed Up Issues
This commit is contained in:
parent
58e619bb73
commit
c9926d7de3
|
@ -10,14 +10,13 @@ module.exports = {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName('clear')
|
.setName('clear')
|
||||||
.setDescription('Clears a certain amount of text!')
|
.setDescription('Clears a certain amount of text!')
|
||||||
.addNumberOption(option =>
|
.addIntegerOption(option =>
|
||||||
option.setName('amount')
|
option.setName('amount')
|
||||||
.setDescription('Set the amount to clear!')
|
.setDescription('Set the amount to clear!')
|
||||||
|
.setMinValue(1)
|
||||||
.setRequired(true)),
|
.setRequired(true)),
|
||||||
async execute(interaction) {
|
async execute(interaction) {
|
||||||
const amount = interaction.options.getNumber('amount');
|
const amount = interaction.options.getInteger('amount');
|
||||||
|
|
||||||
if(amount <= 0) return interaction.reply({ content: "<:xmark:1238963594758979736> This is not a valid number!", ephemeral: true });
|
|
||||||
|
|
||||||
if(!interaction.member.permissions.has(PermissionsBitField.Flags.ManageMessages)) return interaction.reply({ content: "<:xmark:1238963594758979736> You dont have permission to use this command", ephemeral: true });
|
if(!interaction.member.permissions.has(PermissionsBitField.Flags.ManageMessages)) return interaction.reply({ content: "<:xmark:1238963594758979736> You dont have permission to use this command", ephemeral: true });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue