34 |
let id: string; |
let id: string; |
35 |
|
|
36 |
if (options.isInteraction) { |
if (options.isInteraction) { |
37 |
id = await <string> options.options.getNumber('id')?.toString(); |
id = await <string> options.options.getString('id'); |
38 |
} |
} |
39 |
else { |
else { |
40 |
id = await options.args[0]; |
id = await options.args[0]; |
41 |
} |
} |
42 |
|
|
43 |
const note = await Note.findOne({ |
const note = await Note.findOne({ |
44 |
where: { |
guild_id: msg.guild!.id, |
45 |
guild_id: msg.guild!.id, |
_id: id |
|
id |
|
|
} |
|
46 |
}); |
}); |
47 |
|
|
48 |
if (!note) { |
if (!note) { |
50 |
return; |
return; |
51 |
} |
} |
52 |
|
|
53 |
await note.destroy(); |
await note.delete(); |
54 |
|
|
55 |
await msg.reply({ |
await msg.reply({ |
56 |
embeds: [ |
embeds: [ |