Ejemplo n.º 1
0
        private async Task <bool> ThridStep()
        {
            var interval = message.Text.Trim();

            if (int.TryParse(interval, out var valid))
            {
                groupSave.Interval = valid;
                var result = dbManager.AddGroup(groupSave);

                if (result)
                {
                    await bot.SendTextMessageAsync(message.Chat.Id, "Complete save group");

                    return(true);
                }
                await bot.SendTextMessageAsync(message.Chat.Id, "The group is exist");

                return(true);
            }
            await bot.SendTextMessageAsync(message.Chat.Id, "Incorrect interval, try again: ");

            return(false);
        }