/[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 81 by rakin, Mon Jul 29 17:28:31 2024 UTC revision 125 by rakin, Mon Jul 29 17:28:41 2024 UTC
# Line 21  export default class InteractionCreateEv Line 21  export default class InteractionCreateEv
21              return;              return;
22          }          }
23    
24          if (interaction.isCommand()) {          if (interaction.isCommand() || interaction.isContextMenu()) {
25              await client.setMessage(interaction);              await client.setMessage(interaction);
26    
27              const { commandName } = interaction;              const { commandName } = interaction;
28    
29              const command = await client.commands.get(commandName);              const command = await client.commands.get(commandName);
30    
31              if (command && command.supportsInteractions) {              if (command && ((interaction.isCommand() && command.supportsInteractions) || (interaction.isContextMenu() && command.supportsContextMenu))) {
32                  const allowed = await client.auth.verify(interaction.member! as GuildMember, command);                  const allowed = await client.auth.verify(interaction.member! as GuildMember, command);
33    
34                  if (!allowed) {                  if (!allowed) {

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26