Merge branch 'main' of https://github.com/VermiumSifell/xyter
This commit is contained in:
commit
a13652a276
1 changed files with 13 additions and 14 deletions
|
@ -46,14 +46,14 @@ module.exports = async (interaction) => {
|
|||
const counterExist = await counters.findOne({
|
||||
guildId: member.guild.id,
|
||||
channelId: channel.id,
|
||||
word: word,
|
||||
word,
|
||||
});
|
||||
|
||||
if (!counterExist) {
|
||||
await counters.create({
|
||||
guildId: member.guild.id,
|
||||
channelId: channel.id,
|
||||
word: word,
|
||||
word,
|
||||
counter: start || 0,
|
||||
});
|
||||
// Create embed object
|
||||
|
@ -72,19 +72,18 @@ module.exports = async (interaction) => {
|
|||
`Guild: ${member.guild.id} User: ${member.id} added ${channel.id} as a counter using word "${word}" for counting.`
|
||||
);
|
||||
|
||||
// Send interaction reply
|
||||
return await interaction.editReply({ embeds: [embed] });
|
||||
} else {
|
||||
// Create embed object
|
||||
const embed = {
|
||||
title: 'Admin - Counter',
|
||||
description: `${channel} is already a counting channel.`,
|
||||
timestamp: new Date(),
|
||||
color: config.colors.error,
|
||||
footer: { iconURL: config.footer.icon, text: config.footer.text },
|
||||
};
|
||||
|
||||
// Send interaction reply
|
||||
return await interaction.editReply({ embeds: [embed] });
|
||||
}
|
||||
// Create embed object
|
||||
const embed = {
|
||||
title: 'Admin - Counter',
|
||||
description: `${channel} is already a counting channel.`,
|
||||
timestamp: new Date(),
|
||||
color: config.colors.error,
|
||||
footer: { iconURL: config.footer.icon, text: config.footer.text },
|
||||
};
|
||||
|
||||
// Send interaction reply
|
||||
return await interaction.editReply({ embeds: [embed] });
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue