diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-08-14 19:46:11 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-08-14 19:46:11 +0200 |
commit | cb8846a7a3310f8513989da5aadb5202f048a1b3 (patch) | |
tree | cfbcf2506947d0f820208dd4cdb7a56c660ef0f9 /LibMatrix.ExampleBot/Bot/Commands/PingCommand.cs | |
parent | Update dependencies (diff) | |
download | LibMatrix-cb8846a7a3310f8513989da5aadb5202f048a1b3.tar.xz |
Code cleanup
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 +} |