From 3ddb2ad4b241f9879d36a6332af8a401708193a6 Mon Sep 17 00:00:00 2001 From: MotiCAT Date: Wed, 4 Oct 2023 20:16:27 +0900 Subject: [PATCH] fix: some commands do not work properly --- src/commands/ban.js | 2 +- src/commands/context_kick.js | 2 +- src/commands/kick.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/ban.js b/src/commands/ban.js index c558f90..4c59967 100644 --- a/src/commands/ban.js +++ b/src/commands/ban.js @@ -10,7 +10,7 @@ module.exports = { const user = interaction.options.getUser('member'); const member = await interaction.guild.members.fetch(user.id); if (!member) return interaction.reply({ embeds: [new EmbedBuilder().addFields({ name: 'Error', value: 'サーバー内に存在しないメンバーです。' }).setFooter({ text: 'CH Protect 0.0.1', iconURL: interaction.client.user.displayAvatarURL() }).setColor('#ff0000')], ephemeral: true }); - member.timeout(time) + member.ban() .then(() => { interaction.reply({ embeds: [new EmbedBuilder().addFields({ name: 'Done.', value: '指定したメンバーをBANしました。' }).setFooter({ text: 'CH Protect 0.0.1', iconURL: interaction.client.user.displayAvatarURL() }).setColor('#3CB371')], ephemeral: true }); }) diff --git a/src/commands/context_kick.js b/src/commands/context_kick.js index 25ebe1d..63626eb 100644 --- a/src/commands/context_kick.js +++ b/src/commands/context_kick.js @@ -7,7 +7,7 @@ module.exports = { async execute(interaction) { const member = await interaction.guild.members.fetch(interaction.targetUser.id) if (!member) return interaction.reply({ embeds: [new EmbedBuilder().addFields({ name: 'Error', value: 'サーバー内に存在しないメンバーです。' }).setColor('#ff0000').setFooter({ text: 'CH Protect 0.0.1', iconURL: interaction.client.user.displayAvatarURL() })] }); - member.ban() + member.kick() .then(() => { interaction.reply({ embeds: [new EmbedBuilder().addFields({ name: 'Done.', value: '指定したメンバーを追放しました。' }).setFooter({ text: 'CH Protect 0.0.1', iconURL: interaction.client.user.displayAvatarURL() }).setColor('#3CB371')], ephemeral: true }); }) diff --git a/src/commands/kick.js b/src/commands/kick.js index 7b7e5f1..8c94943 100644 --- a/src/commands/kick.js +++ b/src/commands/kick.js @@ -10,7 +10,7 @@ module.exports = { const user = interaction.options.getUser('member'); const member = await interaction.guild.members.fetch(user.id); if (!member) return interaction.reply({ embeds: [new EmbedBuilder().addFields({ name: 'Error', value: '存在しないメンバーです。' }).setFooter({ text: 'CH Protect 0.0.1', iconURL: interaction.client.user.displayAvatarURL() }).setColor('#ff0000')], ephemeral: true }); - member.timeout(time) + member.kick() .then(() => { interaction.reply({ embeds: [new EmbedBuilder().addFields({ name: 'Done.', value: '指定したユーザーを追放しました。' }).setFooter({ text: 'CH Protect 0.0.1', iconURL: interaction.client.user.displayAvatarURL() }).setColor('#3CB371')], ephemeral: true }); })