diff options
Diffstat (limited to 'LibMatrix.ExampleBot/Bot/Commands/PingCommand.cs')
-rw-r--r-- | LibMatrix.ExampleBot/Bot/Commands/PingCommand.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/LibMatrix.ExampleBot/Bot/Commands/PingCommand.cs b/LibMatrix.ExampleBot/Bot/Commands/PingCommand.cs index 664dc53..a7c65b5 100644 --- a/LibMatrix.ExampleBot/Bot/Commands/PingCommand.cs +++ b/LibMatrix.ExampleBot/Bot/Commands/PingCommand.cs @@ -1,17 +1,15 @@ using LibMatrix.ExampleBot.Bot.Interfaces; +using LibMatrix.StateEventTypes.Spec; -namespace LibMatrix.ExampleBot.Bot.Commands; +namespace LibMatrix.ExampleBot.Bot.Commands; public class PingCommand : ICommand { - public PingCommand() { - } - public string Name { get; } = "ping"; public string Description { get; } = "Pong!"; public async Task Invoke(CommandContext ctx) { - await ctx.Room.SendMessageEventAsync("m.room.message", new() { + await ctx.Room.SendMessageEventAsync("m.room.message", new RoomMessageEventData { Body = "pong!" }); } -} \ No newline at end of file +} |