actually done, barring bugs
This commit is contained in:
parent
5454333ac4
commit
dd9c471a39
@ -4,11 +4,10 @@ public class Config
|
||||
{
|
||||
public string name { get; set; } = "guy who didn't configure";
|
||||
public string bootstrap_servers { get; set; } = "localhost:9092";
|
||||
public List<Command> commands { get; set; }
|
||||
public class Command
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string shell { get; set; }
|
||||
}
|
||||
public List<Command> commands { get; set; }
|
||||
public List<Command> checks { get; set; }
|
||||
}
|
@ -22,8 +22,7 @@ namespace directors_assistant
|
||||
{
|
||||
conf = JsonConvert.DeserializeObject<Config>(File.ReadAllText("appsettings.json"));
|
||||
telefranz = new Telefranz(conf.name, conf.bootstrap_servers,
|
||||
conf.commands.Select(c => c.name).ToList(),
|
||||
conf.checks.Select(c => c.name).ToList());
|
||||
conf.commands.Select(c => c.name).ToList());
|
||||
telefranz.addHandler((silver_messages.directorial.execute_command ec) =>
|
||||
{
|
||||
var matchedCommands = conf.commands.Where(c => c.name == ec.command)?.ToList();
|
||||
@ -53,9 +52,6 @@ namespace directors_assistant
|
||||
}
|
||||
}
|
||||
});
|
||||
telefranz.addHandler((silver_messages.directorial.execute_check ec) => {
|
||||
//TODO
|
||||
});
|
||||
await Task.Delay(1000);
|
||||
telefranz.ProduceMessage(new silver_messages.global.sound_off());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user