diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2023-12-14 07:20:46 +0100 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2023-12-14 07:20:46 +0100 |
commit | 5affd9f061e75f6575a2fe6715f9e8757cfe87e8 (patch) | |
tree | 13ea35ce981094a960746777a16dff8815c45e55 /Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs | |
parent | Temp state (diff) | |
download | LibMatrix-5affd9f061e75f6575a2fe6715f9e8757cfe87e8.tar.xz |
Cleanup
Diffstat (limited to '')
-rw-r--r-- | Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs index 2d04e37..94ea846 100644 --- a/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs +++ b/Utilities/LibMatrix.Utilities.Bot/Interfaces/CommandContext.cs @@ -5,8 +5,8 @@ using LibMatrix.RoomTypes; namespace LibMatrix.Utilities.Bot.Interfaces; public class CommandContext { - public GenericRoom Room { get; set; } - public StateEventResponse MessageEvent { get; set; } + public required GenericRoom Room { get; set; } + public required StateEventResponse MessageEvent { get; set; } public string MessageContentWithoutReply => (MessageEvent.TypedContent as RoomMessageEventContent)! @@ -16,7 +16,7 @@ public class CommandContext { public string CommandName => MessageContentWithoutReply.Split(' ')[0][1..]; public string[] Args => MessageContentWithoutReply.Split(' ')[1..]; - public AuthenticatedHomeserverGeneric Homeserver { get; set; } + public required AuthenticatedHomeserverGeneric Homeserver { get; set; } public async Task<EventIdResponse> Reply(RoomMessageEventContent content) => await Room.SendMessageEventAsync(content); } |