示例#1
0
        public async Task <string> ListModules(object sender, CommandHandlerEventArgs e)
        {
            Console.WriteLine("We're getting there...");
            var modules = await SendWait <ModuleList>(new ListModules());

            return($"{modules.Modules.Count} module(s) loaded: [{string.Join(", ", modules.Modules)}]");
        }
示例#2
0
        public async Task <string> GetModuleInfo(object sender, CommandHandlerEventArgs e)
        {
            var module_name = e.Arguments;
            var module      = await SendWait <ModuleInfo>(new GetModuleInfo(module_name));

            return($"{module.ClientHello.HumanReadableName} " +
                   $"({string.Join(", ", new[] { module.ClientHello.Version, module.ClientHello.Language, module.ClientHello.License }.Where(t => !string.IsNullOrEmpty(t)))}) " +
                   $"has been up for {Utilities.TimeSpanToPrettyString(module.Uptime)} and is {module.Health.ToString().ToLower()}");
        }
示例#3
0
 public string CanConfirm(object sender, CommandHandlerEventArgs e) => "can confirm";
示例#4
0
 public string Test(object sender, CommandHandlerEventArgs e)
 {
     //Console.WriteLine(e.Contents);
     return("Test successful!");
 }