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

namespace MediaModeratorPoC.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("m.room.message", new RoomMessageEventContent(body: "pong!"));
    }
}