You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// A simple event handler that says pong when you say ping.
/// </summary>
class PingDemo(
ISlackApiClient slack,
ILogger<PingDemo> logger
) : IEventHandler<MessageEvent>
{
public async Task Handle(MessageEvent slackEvent)
{
if (slackEvent.Text?.Contains("ping", StringComparison.OrdinalIgnoreCase) == true)
{
logger.LogInformation("Received ping from {User} in the {Channel} channel", (await slack.Users.Info(slackEvent.User)).Name, (await slack.Conversations.Info(slackEvent.Channel)).Name);