private static (BotCommands, System.Reflection.MethodInfo[]) Bot_OnNewUser(Telegram.Bot.Types.Chat chat, Telegram.Bot.Types.User user) { Commands c = new Commands(chat); System.Reflection.MethodInfo[] m = c.GetType().GetMethods() .Where(d => d.ReturnType == typeof(Task) && BotController.CheckParams(d.GetParameters())) .ToArray(); return(c, m); }