Fix notes command
This commit is contained in:
@@ -68,17 +68,15 @@ export default {
|
|||||||
|
|
||||||
await Database.putNote(user.id, reason, interaction.user.id);
|
await Database.putNote(user.id, reason, interaction.user.id);
|
||||||
|
|
||||||
if (isStaffChannel) interaction.editReply('Added note.');
|
interaction.editReply('Added note.');
|
||||||
else interaction.editReply({ content: 'Added note.' });
|
|
||||||
} else if (subcommand == 'remove') {
|
} else if (subcommand == 'remove') {
|
||||||
const noteId = interaction.options.getInteger('note', true);
|
const noteId = interaction.options.getInteger('note', true);
|
||||||
|
|
||||||
if (await Database.removeNote(noteId)) {
|
if (await Database.removeNote(noteId)) {
|
||||||
if (isStaffChannel) interaction.editReply('Removed note.');
|
interaction.editReply('Removed note.');
|
||||||
else interaction.editReply({ content: 'Removed note.' });
|
|
||||||
} else {
|
} else {
|
||||||
if (isStaffChannel) interaction.editReply('Note not found.');
|
interaction.editReply('Note not found.');
|
||||||
else interaction.editReply({ content: 'Note not found.' });
|
|
||||||
}
|
}
|
||||||
} else if (subcommand == 'list') {
|
} else if (subcommand == 'list') {
|
||||||
const noteMessage = await getNoteMessage(user.id, 1);
|
const noteMessage = await getNoteMessage(user.id, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user