blob: 916649e21e4a036e9aee0189ef61d399347a2457 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
using LibMatrix.Utilities.Bot.Interfaces;
namespace MatrixContentFilter.Commands;
public class NewRoomCommand(IServiceProvider svcs) : ICommand {
public string Name { get; } = "newroom";
public string[]? Aliases { get; } = ["nr"];
public string Description { get; } = "Create a new room";
public bool Unlisted { get; } = false;
public async Task Invoke(CommandContext ctx) {
await ctx.Homeserver.CreateRoom(new() {
Invite = [ctx.MessageEvent.Sender!]
});
}
}
|