/[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 51 by rakin, Mon Jul 29 17:28:23 2024 UTC revision 55 by rakin, Mon Jul 29 17:28:24 2024 UTC
# Line 10  export default class InteractionCreateEv Line 10  export default class InteractionCreateEv
10      }      }
11    
12      async run(client: DiscordClient, interaction: Interaction) {      async run(client: DiscordClient, interaction: Interaction) {
         console.log('inside');  
           
13          if (interaction.isCommand()) {          if (interaction.isCommand()) {
14              await client.setMessage(interaction);              await client.setMessage(interaction);
15    
# Line 34  export default class InteractionCreateEv Line 32  export default class InteractionCreateEv
32                      return;                      return;
33                  }                  }
34    
35                  await command.run(client, interaction, {                  const options = {
36                      cmdName: commandName,                      cmdName: commandName,
37                      options: interaction.options,                      options: interaction.options,
38                      isInteraction: true                      isInteraction: true
39                  } as InteractionOptions);                  } as InteractionOptions;
40    
41                    if (!await client.cooldown.start(interaction, options))
42                        return;
43    
44                    await command.run(client, interaction, options);
45              }              }
46          }          }
47      }      }

Legend:
Removed from v.51  
changed lines
  Added in v.55

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26