/[sudobot]/trunk/src/events/interaction/InteractionCreateEvent.ts
ViewVC logotype

Diff of /trunk/src/events/interaction/InteractionCreateEvent.ts

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

revision 125 by rakin, Mon Jul 29 17:28:41 2024 UTC revision 268 by rakin, Mon Jul 29 17:29:17 2024 UTC
# Line 50  export default class InteractionCreateEv Line 50  export default class InteractionCreateEv
50                      isInteraction: true                      isInteraction: true
51                  } as InteractionOptions;                  } as InteractionOptions;
52    
53                  if (!await client.cooldown.start(interaction, options))                  await command.execute(client, interaction, options);
                     return;  
   
                 await command.run(client, interaction, options);  
54                  (global as any).lastCommand = commandName;                  (global as any).lastCommand = commandName;
55              }              }
56          }          }
# Line 71  export default class InteractionCreateEv Line 68  export default class InteractionCreateEv
68                      return;                      return;
69                  }                  }
70    
71                    if (!(await command.perms(client, interaction))) {
72                        return;
73                    }
74    
75                  const options = {                  const options = {
76                      cmdName: commandName,                      cmdName: commandName,
77                      options: interaction.options,                      options: interaction.options,
# Line 97  export default class InteractionCreateEv Line 98  export default class InteractionCreateEv
98                  if (!allowed) {                  if (!allowed) {
99                      return;                      return;
100                  }                  }
101                    
102                    if (!(await command.perms(client, interaction))) {
103                        return;
104                    }
105    
106                  await command.default(client, interaction);                  await command.default(client, interaction);
107              }              }

Legend:
Removed from v.125  
changed lines
  Added in v.268

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26