示例#1
0
        private static async Task <bool> CheckStatus()
        {
            if (!isActive)
            {
                await IrcEngine.Respond("A mudança de tela está desativada, peça o streamer para ativá-la.");
            }

            return(isActive);
        }
示例#2
0
        public static async Task Respond(string user)
        {
            foreach (var item in Messages)
            {
                await IrcEngine.Whisper(user, item);

                //await Core.Respond(item); // maximo de 500 caracteres por mensagem na twitch
            }

            await IrcEngine.Respond(user + ", confira a aba de sussurros...");
        }
示例#3
0
        private static async Task Exclamacao(string user)
        {
            foreach (var item in List)
            {
                await IrcEngine.Whisper(user, item.Key + "    : " + item.Description);

                await Task.Delay(750);
            }


            await IrcEngine.Respond(user + ", confira a aba de sussurros...");
        }
示例#4
0
        public static async Task <bool> CheckStatus()
        {
            if (SpeakerCore.Status == Status.Disabled)
            {
                await IrcEngine.Respond("O Speaker está off... peça o streamer para aciona-lo...");

                return(false);
            }
            else
            {
                return(true);
            }
        }
        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));
            }
            else
            {
                await IrcEngine.CommandCorrector(cmd,"!SpeakTranslate", user, true);
            }
        }
        public static ScheduledMessage Youtube(DateTime date) =>
        new ScheduledMessage(date, async(ScheduledMessage schM) =>
        {
            if (DateTime.Now >= AutomaticMessages.LastMessage)
            {
                //envia a mensagem
                await IrcEngine.Respond(schM.Message);

                AutomaticMessages.LastMessage = DateTime.Now;

                AutomaticMessages.RemoveQueue(schM.TypeInfo);
                AutomaticMessages.AddQueue(Youtube(DateTime.Now.AddMinutes(schM.WaitingTime.TotalMinutes)));
            }
        },
                             new TimeSpan(0, 45, 0),
                             "Confira o nosso canal no Youtube... // " +
                             "                We are also on YouTube... " + StreamerDefault.Youtube,
                             MessageType.YouTube);
        public static ScheduledMessage Form(DateTime date) =>
        new ScheduledMessage(date, async(ScheduledMessage schM) =>
        {
            if (DateTime.Now >= AutomaticMessages.LastMessage)
            {
                //envia a mensagem
                await IrcEngine.Respond(schM.Message);

                AutomaticMessages.LastMessage = DateTime.Now;

                AutomaticMessages.RemoveQueue(schM.TypeInfo);
                AutomaticMessages.AddQueue(Form(DateTime.Now.AddMinutes(schM.WaitingTime.TotalMinutes)));
            }
        },
                             new TimeSpan(0, 45, 0),
                             "Temos uma pesquisa para conhecer mais o nosso chat... // " +
                             "                Let me know more about you... " + StreamerDefault.Form,
                             MessageType.Form);
        public static ScheduledMessage DrinkWater(DateTime date) =>
        new ScheduledMessage(date, async(ScheduledMessage schM) =>
        {
            if (DateTime.Now >= AutomaticMessages.LastMessage)
            {
                //envia a mensagem
                await IrcEngine.Respond(schM.Message);

                AutomaticMessages.LastMessage = DateTime.Now;

                AutomaticMessages.RemoveQueue(schM.TypeInfo);
                AutomaticMessages.AddQueue(DrinkWater(DateTime.Now.AddMinutes(schM.WaitingTime.TotalMinutes)));
            }
        },
                             new TimeSpan(0, 7, 30),
                             "Não se esqueça de beber Vodka/Água... // " +
                             "                Remember to drink Vodka/Water... ",
                             MessageType.Water);
        public static ScheduledMessage Donate(DateTime date) =>
        new ScheduledMessage(date, async(ScheduledMessage schM) =>
        {
            if (DateTime.Now >= AutomaticMessages.LastMessage)
            {
                //envia a mensagem
                await IrcEngine.Respond(schM.Message);

                AutomaticMessages.LastMessage = DateTime.Now;

                AutomaticMessages.RemoveQueue(schM.TypeInfo);
                AutomaticMessages.AddQueue(Donate(DateTime.Now.AddMinutes(schM.WaitingTime.TotalMinutes)));
            }
        },
                             new TimeSpan(0, 45, 0),
                             "Sinta-se livre para nos apoiar financeiramente... // " +
                             "                Feel free helping us... " + StreamerDefault.PayPal + " " + StreamerDefault.PicPay,
                             MessageType.Donate);
        public static ScheduledMessage GitHub(DateTime date) =>
        new ScheduledMessage(date, async(ScheduledMessage schM) =>
        {
            if (DateTime.Now >= AutomaticMessages.LastMessage)
            {
                //envia a mensagem
                await IrcEngine.Respond(schM.Message);

                AutomaticMessages.LastMessage = DateTime.Now;

                AutomaticMessages.RemoveQueue(schM.TypeInfo);
                AutomaticMessages.AddQueue(GitHub(DateTime.Now.AddMinutes(schM.WaitingTime.TotalMinutes)));
            }
        },
                             new TimeSpan(0, 45, 0),
                             "O nosso bot, todo em C#, está disponível no GitHub... // " +
                             "                Check our chat bot on GitHub... " + StreamerDefault.GitHub,
                             MessageType.GitHub);
        public static ScheduledMessage Discord(DateTime date) =>
        new ScheduledMessage(date, async(ScheduledMessage schM) =>
        {
            if (DateTime.Now >= AutomaticMessages.LastMessage)
            {
                //envia a mensagem
                await IrcEngine.Respond(schM.Message);

                AutomaticMessages.LastMessage = DateTime.Now;

                AutomaticMessages.RemoveQueue(schM.TypeInfo);
                AutomaticMessages.AddQueue(Discord(DateTime.Now.AddMinutes(schM.WaitingTime.TotalMinutes)));
            }
        },
                             new TimeSpan(0, 45, 0), //
                             "Você também pode participar do nosso discord... // " +
                             "                Join us on Discord... " + StreamerDefault.Discord,
                             MessageType.Discord);
        public static async Task Command(string cmd)
        {
            cmd = cmd.ToLower().Trim();

            if (cmd == "false")
            {
                status = Status.Disabled;
            }
            else
            {
                string    msg;
                Languages?src, trg;
                if (GetLanguages(cmd, out src, out trg, out msg))
                {
                    status = Status.Enabled;
                    Target = trg.Value;

                    await IrcEngine.Respond("O tradutor está automatico para " + Target.ToString() + "...");
                }
            }
        }
示例#13
0
        public static async Task <string> TranslateCore(string textToTranslate, bool respond, Languages Trg, Languages?Src = null)
        {
            //checagem de limites
            if (!CheckLimits(textToTranslate))
            {
                return("Limite de tradução gratuita diária estourado.");
            }

            var response = await client.TranslateTextAsync(
                text : textToTranslate,
                targetLanguage : Trg.ToString(),
                sourceLanguage : (Src == null)?null : Src.ToString());

            Console.WriteLine(response.TranslatedText);

            if (respond)
            {
                await IrcEngine.Respond(response.TranslatedText);
            }

            return(response.TranslatedText);
        }
示例#14
0
 private static async Task Donate()
 {
     await IrcEngine.Respond(StreamerDefault.PicPay);
 }
示例#15
0
 private static async Task Store()
 {
     await IrcEngine.Respond(StreamerDefault.StreamElements_Store);
 }
示例#16
0
 private static async Task Salve()
 {
     await IrcEngine.Respond("Salve alá Igão... FortBush CurseLit");
 }
示例#17
0
 private static async Task Tetris()
 {
     await IrcEngine.Respond(TetrisLink);
 }
示例#18
0
 private static async Task Discord()
 {
     await IrcEngine.Respond(StreamerDefault.Discord);
 }
示例#19
0
 private static async Task Pesquisa()
 {
     await IrcEngine.Respond(StreamerDefault.Form);
 }
示例#20
0
 private static async Task DonatePP()
 {
     await IrcEngine.Respond(StreamerDefault.PayPal);
 }
示例#21
0
 private static async Task Youtube()
 {
     await IrcEngine.Respond(StreamerDefault.Youtube);
 }
示例#22
0
 private static async Task GitHub()
 {
     await IrcEngine.Respond(StreamerDefault.GitHub);
 }