/[sudobot]/trunk/src/commands/moderation/NotedelCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/moderation/NotedelCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 333 by rakin, Mon Jul 29 17:28:32 2024 UTC revision 334 by rakin, Mon Jul 29 17:29:36 2024 UTC
# Line 34  export default class NotedelCommand exte Line 34  export default class NotedelCommand exte
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) {
# Line 52  export default class NotedelCommand exte Line 50  export default class NotedelCommand exte
50              return;              return;
51          }          }
52    
53          await note.destroy();          await note.delete();
54    
55          await msg.reply({          await msg.reply({
56              embeds: [              embeds: [

Legend:
Removed from v.333  
changed lines
  Added in v.334

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26