Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wdhdev committed Dec 3, 2024
1 parent 4ef4b70 commit 2e728de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/reminders/cancel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const command: Command = {
try {
const id = interaction.options.get("id")?.value as string;

const reminder = await Reminder.findOne({ _id: id, user: interaction.user.id });
const reminder = await Reminder.findOne({ reminder_id: id, user: interaction.user.id });

if(!reminder) {
const error = new Discord.EmbedBuilder()
Expand Down
2 changes: 1 addition & 1 deletion src/commands/reminders/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const command: Command = {
try {
const id = interaction.options.get("id")?.value as string;

const reminder = await Reminder.findOne({ _id: id, user: interaction.user.id });
const reminder = await Reminder.findOne({ reminder_id: id, user: interaction.user.id });

if(!reminder) {
const error = new Discord.EmbedBuilder()
Expand Down
4 changes: 2 additions & 2 deletions src/commands/reminders/remindme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const command: Command = {
const id = randomUUID().slice(0, 8) as string;

const reminder = await new Reminder({
_id: id,
reminder_id: id,
user: interaction.user.id,
channel: interaction.channel?.id ? interaction.channel?.id : null,
reminder_set: (Date.now()).toString(),
Expand All @@ -114,7 +114,7 @@ const command: Command = {
if(time < client.config.reminders.timeTillSet) {
client.reminders.set(`${interaction.user.id}-${id}`, setTimeout(async () => {
client.reminders.delete(`${interaction.user.id}-${id}`);
await Reminder.findOneAndDelete({ _id: id, user: interaction.user.id });
await Reminder.findOneAndDelete({ reminder_id: id, user: interaction.user.id });

const embed = new Discord.EmbedBuilder()
.setColor(client.config.embeds.default as ColorResolvable)
Expand Down

0 comments on commit 2e728de

Please sign in to comment.