private async Task Disconnected(Exception arg) { await AtomicConsole.WriteLine("Disconnected from Discord; shutting down."); _scriptExecutor.Stop(); _signal.Release(); }
private async Task Log(LogMessage arg) { if (_config.LogDiscord) { await AtomicConsole.WriteLine($"Log: {arg.ToString()}"); } }
private async Task Ready() { // Connected to Discord, let's initialize! _scriptInterface = new ScriptInterface(); _scriptExecutor = new ScriptExecutor(_config, _client, _scriptInterface); _eventDispatcher = new EventDispatcher(_client, _scriptExecutor); _scriptManager = new ScriptManager(_config, _scriptExecutor, _eventDispatcher); _commandManager = new CommandManager(_client, _scriptManager, _scriptInterface); await _commandManager.InitAsync(); await AtomicConsole.WriteLine("ScriptBot Ready."); }
public async Task Print() => await AtomicConsole.WriteLine($"test_print: {_text}");