static async Task Main(string[] args) { Task.Run(() => WebMatBot.IrcEngine.Start()); // run the core of twitch connection in a new thread Task.Run(() => TasksQueueOutput.Start()); Task.Run(() => AutomaticMessages.Start()); Task.Run(() => Lights.Light.Start()); Task.Run(() => PubSubEngine.Start()); await ListeningNewSettings(); // to set new parameters while running }
public static async Task SpeakTranslate(string cmd, string user) { string msg; Languages?src, trg; if (GetLanguages(cmd, out src, out trg, out msg)) { var Target = trg.Value; msg = await TranslateCore(msg, false, Target); await TasksQueueOutput.QueueAddSpeech(async() => await Speak(msg, user, Target)); } }
public static async Task CheckNotice(string input) { string[] properties = input.Split(";"); var loginPropert = properties.First(q => q.StartsWith("login="******"=")[1]; //raider é o cidadão q está enviando a raid pra vc if (input.Contains("msg-id=raid;")) { await TasksQueueOutput.QueueAddSpeech(async() => { await AudioVisual.Party("", Parameters.User); await SpeakerCore.Speak("Muito obrigado, " + raider + ". Você é um Deus...", Parameters.User); }); } }