Skip to content

Commit

Permalink
feat: add support for app command responses
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbooth committed Aug 27, 2023
1 parent 3882d77 commit feee897
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions VPLink/Services/DiscordMessageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ private Task OnDiscordMessageReceived(SocketMessage arg)
}
}

if (arg.Interaction is { Type: InteractionType.ApplicationCommand } interaction)
{
string name = interaction.User.GetDisplayName();
string commandName = interaction.Name;
messages.Add(new RelayedMessage(null, $"⌨️ {name} used /{commandName}", true));
}

AddMessage(messages, displayName, content);

IReadOnlyCollection<IAttachment> attachments = message.Attachments;
Expand Down

0 comments on commit feee897

Please sign in to comment.