about summary refs log tree commit diff
path: root/Utilities/LibMatrix.Utilities.Bot/Commands/PingCommand.cs
blob: 16712ea59d53fa229c1b4af5b01943f51c304c91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
using LibMatrix.EventTypes.Spec;
using LibMatrix.Utilities.Bot.Interfaces;

namespace LibMatrix.Utilities.Bot.Commands;

public class PingCommand : ICommand {
    public string Name { get; } = "ping";
    public string Description { get; } = "Pong!";

    public async Task Invoke(CommandContext ctx) {
        await ctx.Room.SendMessageEventAsync(new RoomMessageEventContent(body: "pong!"));
    }
}